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

Disassembly:
push 0xffffffffffffffff
push 0x413d78
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.0040ea70
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.0040ea70
lea ecx, [esi + 0x154]
mov byte [esp + 0x68], 2
call fcn.0040eb00
test eax, eax
je 0x405e57
lea ecx, [esi + 0x15c]
call fcn.0040eb00
test eax, eax
je 0x405e57
cmp dword [esi + 0x178], ebp
jne 0x405e57
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040ea80
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.00406ad0
mov edx, dword [esp + 0x2c]
push edx
jmp 0x406362
lea ebx, [esi + 0x15c]
push edi
mov ecx, ebx
call fcn.0040eb00
test eax, eax
jne 0x405ec6
cmp dword [esi + 0x178], ebp
je 0x405ef0
lea ecx, [esp + 0x1c]
call fcn.0040ea70
lea edi, [esi + 0x17c]
lea ecx, [esp + 0x1c]
push edi
mov byte [esp + 0x70], 3
call fcn.0040ea90
push ebx
lea ecx, [esp + 0x20]
call fcn.0040eb70
lea ecx, [esp + 0x1c]
call fcn.0040eb00
test eax, eax
jne 0x405eb8
push edi
lea ecx, [esi + 0x154]
call fcn.0040ea90
mov dword [esi + 0x178], ebp
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 2
call fcn.0040ea80
cmp dword [esi + 0x178], ebp
je 0x405ef0
lea eax, [esi + 0x18c]
lea ecx, [esi + 0x17c]
push eax
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403a50
cmp dword [esi + 0x178], ebp
jne 0x4062cc
lea ecx, [esp + 0x14]
call fcn.0040eae0
lea eax, [esi + 0x158]
lea ecx, [esp + 0x14]
push eax
call fcn.0040eb10
push ebx
lea ecx, [esp + 0x18]
call fcn.0040eba0
lea eax, [esi + 0x154]
lea ecx, [esp + 0x14]
push eax
call fcn.0040eb70
lea ecx, [esp + 0x1c]
call fcn.0040ea70
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 4
call fcn.0040eae0
push ebx
lea ecx, [esp + 0x20]
call fcn.0040eb10
lea edx, [esp + 0x14]
lea ecx, [esp + 0x1c]
push edx
call fcn.0040eb10
mov al, byte [esp + 0x13]
push ebp
push ebp
lea ecx, [esp + 0x40]
mov byte [esp + 0x40], al
call fcn.00406c40
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.0040ebd0
test eax, eax
je 0x40606d
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.USER32.dll_SetRectEmpty]
lea ecx, [esp + 0x38]
call fcn.00406800
lea eax, [esp + 0x28]
lea ecx, [esp + 0x38]
push eax
call fcn.004067f0
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 0x406055
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 0x40602a
call edi
test eax, eax
jne 0x406008
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x44]
push eax
call fcn.00403a10
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 0x406036
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.00406a90
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jne 0x405fc8
lea eax, [esp + 0x44]
push eax
call edi
test eax, eax
jne 0x40606d
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403a10
lea ecx, [esp + 0x38]
mov byte [esp + 0x6c], 4
call fcn.004114d0
lea ecx, [esp + 0x18]
call fcn.0040eae0
lea edi, [esi + 0x15c]
mov ecx, edi
call fcn.0040eb00
test eax, eax
jne 0x406137
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.0040ebd0
mov ecx, dword [esp + 0x3c]
test eax, eax
je 0x406113
mov eax, dword [ecx]
cmp eax, ecx
mov dword [esp + 0x20], eax
je 0x406113
mov ecx, dword [esi + 0x1c]
add eax, 8
push eax
call fcn.00403e20
mov ecx, dword [esp + 0x20]
add ecx, 8
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040ea90
lea edx, [esp + 0x28]
push ebp
push edx
lea ecx, [esp + 0x28]
call fcn.00406a90
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jne 0x4060db
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.00406ad0
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.0040eb00
test eax, eax
jne 0x4061dc
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.0040ebd0
test eax, eax
mov eax, dword [esp + 0x3c]
je 0x4061b8
mov ecx, dword [eax]
cmp ecx, eax
mov dword [esp + 0x20], ecx
je 0x4061b8
add ecx, 8
push ecx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.004037e0
lea edx, [esp + 0x28]
push ebp
push edx
lea ecx, [esp + 0x28]
call fcn.00406a90
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
cmp ecx, eax
jne 0x40618c
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.00406ad0
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.0040eba0
lea eax, [esi + 0x15c]
mov ecx, edi
push eax
call fcn.0040eba0
lea ecx, [esp + 0x18]
call fcn.0040eb00
test eax, eax
jne 0x40621d
lea ecx, [esi + 0x15c]
call fcn.0040eae0
mov ecx, ebx
call fcn.0040eae0
cmp dword [esi + 0x44], ebp
jne 0x406272
lea ecx, [esp + 0x20]
call fcn.0040ea70
lea edx, [esi + 0x34]
lea ecx, [esp + 0x20]
push edx
mov byte [esp + 0x70], 8
call fcn.0040ea90
lea eax, [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
call fcn.0040eb70
lea ecx, [esp + 0x20]
call fcn.0040eb00
test eax, eax
jne 0x40625f
mov dword [esi + 0x44], 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x6c], 4
call fcn.0040ea80
cmp dword [esi + 0x44], ebp
je 0x4062be
lea ecx, [esp + 0x54]
lea edi, [esi + 0x34]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403b70
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 0x4062bb
mov ecx, dword [esi + 0x1c]
lea edx, [esp + 0x18]
push edi
push edx
call fcn.004037e0
mov dword [esi + 0x44], ebp
lea ecx, [esp + 0x1c]
mov byte [esp + 0x6c], 2
call fcn.0040ea80
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x18]
push eax
xor ebx, ebx
call fcn.0040ebd0
test eax, eax
je 0x406300
mov eax, dword [esp + 0x30]
mov edi, dword [eax]
cmp edi, eax
je 0x406300
lea ecx, [edi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
call fcn.00403a00
mov edi, dword [edi]
add ebx, eax
cmp edi, dword [esp + 0x30]
jne 0x4062ea
mov eax, dword [esi + 0x178]
pop edi
cmp eax, ebp
je 0x40630c
inc ebx
cmp ebx, ebp
jne 0x406397
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040ea80
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 0x406361
lea edx, [esp + 0x24]
push ebp
push edx
lea ecx, [esp + 0x24]
call fcn.00406a90
mov eax, dword [eax]
lea ecx, [esp + 0x18]
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.00411520
cmp dword [esp + 0x1c], esi
jne 0x406337
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.0040ea80
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.00405d50
test eax, eax
jne 0x4063e8
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040ea80
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.00406ad0
mov edx, dword [esp + 0x2c]
push edx
jmp 0x40646e
cmp dword [esi + 0x178], ebp
je 0x406430
lea eax, [esi + 0x18c]
lea ecx, [esi + 0x17c]
push eax
push ecx
mov ecx, esi
mov dword [esi + 0x178], ebp
call fcn.00406640
test eax, eax
jne 0x406430
lea ecx, [esp + 0x10]
mov byte [esp + 0x68], 1
call fcn.0040ea80
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x68], 0
push eax
lea edx, [esp + 0x28]
mov ecx, dword [eax]
push ecx
jmp 0x40645f
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.00406550
test eax, eax
mov byte [esp + 0x68], 1
lea ecx, [esp + 0x10]
jne 0x406480
call fcn.0040ea80
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.00406ad0
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 0x406493
call fcn.0040ea80
lea ecx, [esp + 0x28]
mov byte [esp + 0x68], 0
call fcn.004114d0
lea ecx, [esp + 0x14]
mov dword [esp + 0x68], 0xffffffff
call fcn.0040ea80
mov ecx, dword [esp + 0x60]
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x60
ret