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

Disassembly:
push 0xffffffffffffffff
push 0x43d1d8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4516ac]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
call fcn.0040c04d
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a199
push 0x80004005
call fcn.004010d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x5c]
xor ebp, ebp
cmp dword [esi + 0xe8], edi
mov esi, dword [esp + 0x60]
mov dword [esp + 0x54], edi
jne 0x40a263
mov ecx, dword [esp + 0x14]
add ecx, 0x90
push ecx
lea ecx, [esp + 0x1c]
call fcn.00402c10
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x60], ebp
je 0x40a2fb
add eax, 0x64
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], 5
mov ecx, dword [esi + 8]
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0xc]
mov dword [esp + 0x24], ecx
push 0x411
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x64]
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x30], edx
mov edx, dword [ebx]
mov edx, dword [edx + 0x68]
push 0xffffffffffffffff
push eax
mov ecx, ebx
call edx
mov eax, dword [esp + 0x28]
mov ecx, eax
sub ecx, dword [esp + 0x20]
mov edx, edi
sub edx, ebp
cmp ecx, edx
jle 0x40a252
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x44], edx
mov edi, eax
add dword [esp + 0x60], 4
sub dword [esp + 0x5c], 1
jne 0x40a1f3
jmp 0x40a2fb
mov eax, dword [esp + 0x14]
add eax, 0x94
push eax
lea ecx, [esp + 0x1c]
call fcn.00402c10
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 0x60], ebp
je 0x40a2fb
mov edx, ecx
add edx, 0x78
mov dword [esp + 0x60], edx
mov dword [esp + 0x5c], 5
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x28], eax
mov eax, dword [ecx]
push 0x411
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x2c], edx
mov edx, dword [ebx]
mov edx, dword [edx + 0x68]
push 0xffffffffffffffff
push eax
mov ecx, ebx
call edx
mov eax, dword [esp + 0x28]
mov ecx, eax
sub ecx, dword [esp + 0x20]
mov edx, edi
sub edx, ebp
cmp ecx, edx
jle 0x40a2ef
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x44], edx
mov edi, eax
add dword [esp + 0x60], 4
sub dword [esp + 0x5c], 1
jne 0x40a290
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0xc]
push 0x411
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x3c], edx
mov edx, dword [ebx]
mov edx, dword [edx + 0x68]
push 0xffffffffffffffff
push ecx
mov ecx, ebx
call edx
mov eax, dword [esp + 0x14]
cmp dword [eax + 0xe8], 0
mov dword [esp + 0x30], ebp
mov dword [esp + 0x38], edi
jne 0x40a349
xor cl, cl
jmp 0x40a353
cmp dword [eax + 0xc8], 0
setne cl
movzx ebx, cl
lea ecx, [ebx + 0xc]
shl ecx, 4
add eax, ecx
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x64]
sub edi, ebp
add edi, dword [eax]
mov eax, dword [esi + 0xc]
sub eax, dword [esi + 4]
shl ebx, 4
sub eax, edi
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
sub eax, dword [ebx + edx + 0xbc]
mov edi, dword [esp + 0x68]
sub eax, dword [esi]
lea ebx, [ebx + edx + 0xbc]
cdq
sub eax, edx
sar eax, 1
mov dword [ecx], eax
mov edx, dword [ebx]
mov ebx, dword [esp + 0x2c]
add edx, eax
mov eax, dword [ecx + 4]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x60]
add eax, dword [edx]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [edi], ebx
mov dword [edi + 4], ebp
mov ebp, dword [esp + 0x34]
mov dword [edi + 8], ebp
mov dword [edi + 0xc], eax
mov eax, dword [esi + 8]
sub eax, dword [esi]
sub eax, ebp
add eax, ebx
cdq
sub eax, edx
sar eax, 1
mov dword [edi], eax
sub eax, ebx
add eax, ebp
mov dword [edi + 8], eax
mov edx, dword [ecx + 0xc]
mov dword [edi + 4], edx
mov eax, dword [ecx + 0xc]
mov edx, dword [esp + 0x14]
add dword [edi + 0xc], eax
cmp dword [edx + 0x9c], 0
je 0x40a40d
mov esi, dword [sym.imp.USER32.dll_OffsetRect]
push 1
push 1
push ecx
call esi
push 1
push 1
push edi
call esi
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x54], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a435
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 0x10