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

Disassembly:
push 0xffffffffffffffff
push 0x414208
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push ebp
push esi
mov esi, ecx
lea ecx, [esp + 0x14]
call fcn.0040ee90
mov al, byte [esp + 0xf]
xor ebp, ebp
push 0x18
mov dword [esp + 0x6c], ebp
mov byte [esp + 0x2c], al
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040ee90
lea ecx, [esi + 0x154]
mov byte [esp + 0x68], 2
call fcn.0040ef20
test eax, eax
je 0x405fd7
lea ecx, [esi + 0x15c]
call fcn.0040ef20
test eax, eax
je 0x405fd7
cmp dword [esi + 0x178], ebp
jne 0x405fd7
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040eea0
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], 0
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x34]
call fcn.00406cd0
mov edx, dword [esp + 0x2c]
push edx
jmp 0x4064e2
lea ebx, [esi + 0x15c]
push edi
mov ecx, ebx
call fcn.0040ef20
test eax, eax
jne 0x406046
cmp dword [esi + 0x178], ebp
je 0x406070
lea ecx, [esp + 0x1c]
call fcn.0040ee90
lea edi, [esi + 0x17c]
lea ecx, [esp + 0x1c]
push edi
mov byte [esp + 0x70], 3
call fcn.0040eeb0
push ebx
lea ecx, [esp + 0x20]
call fcn.0040ef90
lea ecx, [esp + 0x1c]
call fcn.0040ef20
test eax, eax
jne 0x406038
push edi
lea ecx, [esi + 0x154]
call fcn.0040eeb0
mov dword [esi + 0x178], ebp
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 2
call fcn.0040eea0
cmp dword [esi + 0x178], ebp
je 0x406070
lea eax, [esi + 0x18c]
lea ecx, [esi + 0x17c]
push eax
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403ba0
cmp dword [esi + 0x178], ebp
jne 0x40644c
lea ecx, [esp + 0x14]
call fcn.0040ef00
lea eax, [esi + 0x158]
lea ecx, [esp + 0x14]
push eax
call fcn.0040ef30
push ebx
lea ecx, [esp + 0x18]
call fcn.0040efc0
lea eax, [esi + 0x154]
lea ecx, [esp + 0x14]
push eax
call fcn.0040ef90
lea ecx, [esp + 0x1c]
call fcn.0040ee90
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 4
call fcn.0040ef00
push ebx
lea ecx, [esp + 0x20]
call fcn.0040ef30
lea edx, [esp + 0x14]
lea ecx, [esp + 0x1c]
push edx
call fcn.0040ef30
mov al, byte [esp + 0x13]
push ebp
push ebp
lea ecx, [esp + 0x40]
mov byte [esp + 0x40], al
call fcn.00406e40
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebp
lea ecx, [esp + 0x38]
mov byte [esp + 0x6c], 5
push ecx
lea ecx, [esp + 0x20]
call fcn.0040eff0
test eax, eax
je 0x4061ed
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.USER32.dll_SetRectEmpty]
lea ecx, [esp + 0x38]
call fcn.004069c0
lea eax, [esp + 0x28]
lea ecx, [esp + 0x38]
push eax
call fcn.00411990
mov eax, dword [eax]
mov ecx, dword [esp + 0x3c]
mov edi, dword [sym.imp.USER32.dll_IsRectEmpty]
cmp eax, ecx
mov dword [esp + 0x20], eax
je 0x4061d5
mov ebx, dword [sym.imp.USER32.dll_UnionRect]
add eax, 8
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x54], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x58], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x5c], edx
lea edx, [esp + 0x44]
mov ecx, dword [ecx + 0xc]
push edx
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x54]
cmp eax, ecx
jle 0x4061aa
call edi
test eax, eax
jne 0x406188
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x44]
push eax
call fcn.00403b60
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
jmp 0x4061b6
lea eax, [esp + 0x58]
lea ecx, [esp + 0x48]
push eax
push ecx
call ebx
lea edx, [esp + 0x28]
push ebp
push edx
lea ecx, [esp + 0x28]
call fcn.00406c50
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jne 0x406148
lea eax, [esp + 0x44]
push eax
call edi
test eax, eax
jne 0x4061ed
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403b60
lea ecx, [esp + 0x38]
mov byte [esp + 0x6c], 4
call fcn.00406970
lea ecx, [esp + 0x18]
call fcn.0040ef00
lea edi, [esi + 0x15c]
mov ecx, edi
call fcn.0040ef20
test eax, eax
jne 0x4062b7
mov dl, byte [esp + 0x13]
push 0x18
mov byte [esp + 0x3c], dl
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebp
lea eax, [esp + 0x38]
mov ecx, edi
push eax
mov byte [esp + 0x70], 6
call fcn.0040eff0
mov ecx, dword [esp + 0x3c]
test eax, eax
je 0x406293
mov eax, dword [ecx]
cmp eax, ecx
mov dword [esp + 0x20], eax
je 0x406293
mov ecx, dword [esi + 0x1c]
add eax, 8
push eax
call fcn.00403f80
mov ecx, dword [esp + 0x20]
add ecx, 8
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040eeb0
lea edx, [esp + 0x28]
push ebp
push edx
lea ecx, [esp + 0x28]
call fcn.00406c50
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jne 0x40625b
mov eax, dword [ecx]
push ecx
push eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x78], 4
call fcn.00406cd0
mov ecx, dword [esp + 0x3c]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0x14]
call fcn.0040ef20
test eax, eax
jne 0x40635c
mov dl, byte [esp + 0x13]
push 0x18
mov byte [esp + 0x3c], dl
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebp
lea eax, [esp + 0x38]
lea ecx, [esp + 0x14]
push eax
mov byte [esp + 0x70], 7
call fcn.0040eff0
test eax, eax
mov eax, dword [esp + 0x3c]
je 0x406338
mov ecx, dword [eax]
cmp ecx, eax
mov dword [esp + 0x20], ecx
je 0x406338
add ecx, 8
push ecx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403930
lea edx, [esp + 0x28]
push ebp
push edx
lea ecx, [esp + 0x28]
call fcn.00406c50
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
cmp ecx, eax
jne 0x40630c
mov ecx, dword [eax]
push eax
lea eax, [esp + 0x2c]
push ecx
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x78], 4
call fcn.00406cd0
mov ecx, dword [esp + 0x3c]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ebx, [esi + 0x158]
lea edi, [esi + 0x154]
push ebx
mov ecx, edi
call fcn.0040efc0
lea eax, [esi + 0x15c]
mov ecx, edi
push eax
call fcn.0040efc0
lea ecx, [esp + 0x18]
call fcn.0040ef20
test eax, eax
jne 0x40639d
lea ecx, [esi + 0x15c]
call fcn.0040ef00
mov ecx, ebx
call fcn.0040ef00
cmp dword [esi + 0x44], ebp
jne 0x4063f2
lea ecx, [esp + 0x20]
call fcn.0040ee90
lea edx, [esi + 0x34]
lea ecx, [esp + 0x20]
push edx
mov byte [esp + 0x70], 8
call fcn.0040eeb0
lea eax, [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
call fcn.0040ef90
lea ecx, [esp + 0x20]
call fcn.0040ef20
test eax, eax
jne 0x4063df
mov dword [esi + 0x44], 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x6c], 4
call fcn.0040eea0
cmp dword [esi + 0x44], ebp
je 0x40643e
lea ecx, [esp + 0x54]
lea edi, [esi + 0x34]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403cc0
mov ecx, dword [eax]
mov edx, edi
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
lea ecx, [esi + 0x198]
push ecx
push edi
push edi
mov dword [edx + 0xc], eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x40643b
mov ecx, dword [esi + 0x1c]
lea edx, [esp + 0x18]
push edi
push edx
call fcn.00403930
mov dword [esi + 0x44], ebp
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 2
call fcn.0040eea0
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x18]
push eax
xor ebx, ebx
call fcn.0040eff0
test eax, eax
je 0x406480
mov eax, dword [esp + 0x30]
mov edi, dword [eax]
cmp edi, eax
je 0x406480
lea ecx, [edi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403b50
mov edi, dword [edi]
add ebx, eax
cmp edi, dword [esp + 0x30]
jne 0x40646a
mov eax, dword [esi + 0x178]
pop edi
cmp eax, ebp
je 0x40648c
inc ebx
cmp ebx, ebp
jne 0x406517
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040eea0
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], 0
mov esi, eax
mov ecx, dword [eax]
cmp ecx, eax
mov dword [esp + 0x1c], ecx
je 0x4064e1
lea edx, [esp + 0x24]
push ebp
push edx
lea ecx, [esp + 0x24]
call fcn.00406c50
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.00406c90
cmp dword [esp + 0x1c], esi
jne 0x4064b7
mov eax, dword [esp + 0x2c]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x68], 0xffffffff
call fcn.0040eea0
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
add esp, 0x60
ret
xor edx, edx
lea eax, [esp + 0x20]
mov dl, bh
push 4
mov dh, bl
push eax
push ebp
mov ecx, esi
mov word [esp + 0x2e], dx
call fcn.00405ed0
test eax, eax
jne 0x406568
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040eea0
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], 0
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x34]
call fcn.00406cd0
mov edx, dword [esp + 0x2c]
push edx
jmp 0x4065ee
cmp dword [esi + 0x178], ebp
je 0x4065b0
lea eax, [esi + 0x18c]
lea ecx, [esi + 0x17c]
push eax
push ecx
mov ecx, esi
mov dword [esi + 0x178], ebp
call fcn.004067c0
test eax, eax
jne 0x4065b0
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040eea0
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], 0
push eax
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ecx
jmp 0x4065df
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.004066d0
test eax, eax
mov byte [esp + 0x68], 1
lea ecx, [esp + 0x10]
jne 0x406600
call fcn.0040eea0
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], 0
push eax
lea edx, [esp + 0x1c]
mov ecx, dword [eax]
push ecx
push edx
lea ecx, [esp + 0x34]
call fcn.00406cd0
mov eax, dword [esp + 0x2c]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
jmp 0x406613
call fcn.0040eea0
lea ecx, [esp + 0x28]
mov byte [esp + 0x68], 0
call fcn.00406970
lea ecx, [esp + 0x14]
mov dword [esp + 0x68], 0xffffffff
call fcn.0040eea0
mov ecx, dword [esp + 0x60]
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x60
ret