Function at 0x402e31
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44bf13
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x4645f4]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
call fcn.00402115
mov edi, eax
mov eax, dword [ebx + 0x31c]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x30], edi
jne 0x402e7a
xor eax, eax
jmp 0x402e7d
mov eax, dword [eax + 0x20]
lea ecx, [esp + 0x4c]
push ecx
push eax
call dword [0x44d62c]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], vtable.CRgn.0
mov dword [esp + 0x78], esi
mov eax, dword [esp + 0x58]
sub eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
sub ecx, dword [esp + 0x4c]
push 0xc
push 0xc
push eax
push ecx
push esi
push esi
call dword [0x44d0c0]
push eax
lea ecx, [esp + 0x38]
call fcn.00413ff7
mov eax, dword [ebx + 0x31c]
cmp eax, esi
jne 0x402ecf
xor eax, eax
jmp 0x402ed2
mov eax, dword [eax + 0x20]
push 1
push dword [esp + 0x3c]
push eax
call dword [0x44d630]
push str.SystemButtonMarginTop
lea ecx, [esp + 0x1c]
call fcn.00406bac
push 3
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.00401df9
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
mov dword [esp + 0x1c], eax
call fcn.00401aaa
push str.SystemButtonMarginRight
lea ecx, [esp + 0x1c]
call fcn.00406bac
push 0xf
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.00401df9
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
mov dword [esp + 0x28], eax
call fcn.00401aaa
push str.SystemButtonSpace
lea ecx, [esp + 0x1c]
call fcn.00406bac
push 2
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.00401df9
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
mov dword [esp + 0x2c], eax
call fcn.00401aaa
xor eax, eax
mov dword [esp + 0x3c], esi
lea edi, [esp + 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebx + 0x31c]
cmp eax, esi
mov dword [esp + 0x14], esi
jne 0x402f7f
xor eax, eax
jmp 0x402f82
mov eax, dword [eax + 0x20]
push 0xfffffffffffffff0
push eax
call dword [0x44d628]
push str.MinimizeBox
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28], eax
call fcn.00406bac
push 1
lea eax, [esp + 0x1c]
push eax
lea edi, [ebx + 4]
push edi
call fcn.00401df9
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
mov dword [esp + 0x20], eax
call fcn.00401aaa
cmp dword [esp + 0x20], esi
je 0x402fd5
lea eax, [ebx + 0xf0]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], 1
push str.MaximizeBox
lea ecx, [esp + 0x1c]
call fcn.00406bac
push 1
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.00401df9
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
mov dword [esp + 0x20], eax
call fcn.00401aaa
cmp dword [esp + 0x20], esi
je 0x403028
test dword [esp + 0x24], 0x1000000
mov ecx, dword [esp + 0x14]
lea eax, [ebx + 0x1a8]
jne 0x403020
lea eax, [ebx + 0x260]
inc dword [esp + 0x14]
mov dword [esp + ecx*4 + 0x3c], eax
push str.CloseBox
lea ecx, [esp + 0x1c]
call fcn.00406bac
push 1
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.00401df9
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffff0
mov edi, eax
call fcn.00401aaa
cmp edi, esi
je 0x403064
mov ecx, dword [esp + 0x14]
inc dword [esp + 0x14]
lea eax, [ebx + 0x38]
mov dword [esp + ecx*4 + 0x3c], eax
push esi
lea ecx, [ebx + 0x38]
call fcn.0041a052
push esi
lea ecx, [ebx + 0x260]
call fcn.0041a052
push esi
lea ecx, [ebx + 0xf0]
call fcn.0041a052
push esi
lea ecx, [ebx + 0x1a8]
call fcn.0041a052
mov edi, dword [esp + 0x54]
sub edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x14]
sub edi, dword [esp + 0x28]
cmp eax, esi
je 0x40313a
dec eax
cmp eax, esi
mov dword [esp + 0x14], eax
jl 0x40313a
jmp 0x4030bc
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + eax*4 + 0x3c]
lea eax, [ecx + 0xa0]
mov edx, dword [eax]
sub edx, dword [eax + 8]
lea esi, [ecx + 0xa0]
add edi, edx
mov dword [esp + 0x18], edi
lea edi, [esp + 0x5c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x1c]
sub edi, dword [esp + 0x60]
mov edx, esi
sub edx, dword [esp + 0x5c]
push 1
add eax, edx
mov edx, dword [esp + 0x6c]
add edx, edi
mov dword [esp + 0x6c], edx
sub edx, dword [esp + 0x20]
mov dword [esp + 0x68], eax
push edx
sub eax, esi
push eax
push dword [esp + 0x28]
push esi
call fcn.0041a014
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + eax*4 + 0x3c]
push 5
call fcn.0041a052
sub esi, dword [esp + 0x2c]
dec dword [esp + 0x14]
mov dword [esp + 0x18], esi
mov edi, esi
jns 0x4030b8
xor esi, esi
push str.WindowTitleHeight
lea ecx, [esp + 0x20]
call fcn.00406bac
push 0x14
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x38]
call fcn.00401df9
push eax
push edi
push esi
push esi
add ebx, 0x28
push ebx
call dword [0x44d624]
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.00401aaa
or dword [esp + 0x78], 0xffffffff
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], vtable.CRgn.0
call fcn.00406a7f
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret