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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
push esi
mov esi, ecx
or eax, 0xffffffff
push edi
mov dword [esi + 0x9c], eax
mov dword [esi + 0xa0], eax
call fcn.0040a840
test eax, eax
je 0x40beb0
mov edx, dword [esi + 0x8c]
test edx, edx
je 0x40c447
mov esi, dword [esi + 0x90]
push esi
mov ecx, 0xb
mov eax, 1
push ecx
push eax
call edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x84]
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x40beec
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x40c447
mov esi, dword [esi + 0x90]
mov ecx, 1
push esi
mov edx, ecx
push edx
push ecx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
mov eax, dword [edx]
mov ecx, esi
call eax
mov eax, dword [esi + 0x24]
sub eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x28]
sub ecx, dword [esi + 0x30]
inc eax
inc ecx
test al, 7
mov edx, 0
setne dl
mov edi, eax
sar edi, 3
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
add edx, edi
mov dword [esp + 0x2c], edx
test edx, 3
je 0x40bf4b
mov edi, edx
and edi, 0x80000003
jns 0x40bf3e
dec edi
or edi, 0xfffffffc
inc edi
mov ebx, 4
sub ebx, edi
add edx, ebx
mov dword [esp + 0x2c], edx
push 0x42c358
push ecx
push edx
push ecx
push 0x42c510
push ecx
push eax
push ecx
push 0x42c594
push ecx
push ecx
push ecx
mov edi, 1
push str.__CalcThread___
xor ebx, ebx
push 0x431c48
mov word [esp + 0x6a], di
mov word [esp + 0x68], di
mov dword [esp + 0x6c], ebx
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00409980
add esp, 4
push eax
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00409980
add esp, 4
push eax
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00409980
add esp, 4
push eax
call fcn.00405dd0
add esp, 8
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00407de0
mov ecx, dword [edi]
mov eax, dword [ecx + 4]
test byte [eax + edi + 0xc], 6
jne 0x40bfee
mov eax, dword [eax + edi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40bfee
mov ebx, 4
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
add ecx, edi
test ebx, ebx
je 0x40c00f
mov eax, dword [ecx + 0xc]
or eax, ebx
cmp dword [ecx + 0x38], 0
jne 0x40c007
or eax, 4
push 0
push eax
call fcn.00408020
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.GDI32.dll_CreateBitmapIndirect]
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
jne 0x40c141
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.CreateBitmapIndirect___failed_:
push 0x431c48
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.004029f0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push 0x42c358
push ecx
push eax
push ecx
push 0x42c510
push ecx
mov ecx, dword [esp + 0x3c]
push ecx
push ecx
push 0x42c594
push ecx
push edx
push ecx
push str.__CalcThread___
push 0x431c48
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00409980
add esp, 4
push eax
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00409980
add esp, 4
push eax
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00409980
add esp, 4
push eax
call fcn.00405dd0
add esp, 8
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00407de0
mov eax, dword [edi]
mov eax, dword [eax + 4]
xor ebx, ebx
test byte [eax + edi + 0xc], 6
jne 0x40c0e4
mov eax, dword [eax + edi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40c0e4
mov ebx, 4
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
add ecx, edi
test ebx, ebx
je 0x40c105
mov eax, dword [ecx + 0xc]
or eax, ebx
cmp dword [ecx + 0x38], 0
jne 0x40c0fd
or eax, 4
push 0
push eax
call fcn.00408020
mov edx, dword [esp + 0xc]
mov eax, dword [esi + 0x84]
push edx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x40c447
mov esi, dword [esi + 0x90]
push esi
mov edx, 2
mov ecx, 1
push edx
push ecx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
push edi
push ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.GDI32.dll_SelectObject]
test eax, eax
jne 0x40c26b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.SelectObject___failed_:
push 0x431c48
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.004029f0
push 0x42c358
push ecx
push edi
push ecx
push 0x42c510
push ecx
push ebx
push ecx
push str.__CalcThread___
push 0x431c48
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00402de0
add esp, 4
push eax
call fcn.00405dd0
add esp, 0xc
push eax
call fcn.00402de0
add esp, 4
push eax
call fcn.00405dd0
add esp, 8
mov edi, eax
push 0xa
mov ecx, edi
call fcn.00407de0
mov edx, dword [edi]
mov eax, dword [edx + 4]
xor ebx, ebx
test byte [eax + edi + 0xc], 6
jne 0x40c1f8
mov eax, dword [eax + edi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40c1f8
mov ebx, 4
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
add ecx, edi
test ebx, ebx
je 0x40c219
mov eax, dword [ecx + 0xc]
or eax, ebx
cmp dword [ecx + 0x38], 0
jne 0x40c211
or eax, 4
push 0
push eax
call fcn.00408020
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0xc]
mov edx, dword [esi + 0x84]
push ecx
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x40c447
mov esi, dword [esi + 0x90]
push esi
mov edx, 3
mov ecx, 1
push edx
push ecx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x78]
sub ecx, dword [esi + 0x74]
mov ebx, dword [esp + 0x14]
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
xor edi, edi
add eax, edx
je 0x40c323
mov dword [esp + 0x10], edi
mov eax, dword [esi + 0x58]
sub eax, dword [esi + 0x54]
xor ecx, ecx
sar eax, 2
test eax, eax
je 0x40c2c0
mov edx, dword [esi + 0x74]
mov ebx, dword [esp + 0x10]
mov ebx, dword [ebx + edx]
mov edx, dword [esi + 0x54]
mov edi, edi
cmp ebx, dword [edx]
je 0x40c2bc
inc ecx
add edx, 4
cmp ecx, eax
jb 0x40c2b0
mov ebx, dword [esp + 0x14]
cmp ecx, eax
jne 0x40c2fe
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
push edi
push eax
push ecx
mov ecx, esi
call fcn.0040b170
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x40c323
mov edx, dword [esi + 0x74]
mov eax, dword [esp + 0x10]
mov dword [esi + 0x9c], edi
mov ecx, dword [eax + edx]
mov dword [esi + 0xa0], ecx
cmp byte [esi + 0x94], bl
jne 0x40c323
mov ecx, dword [esi + 0x78]
sub ecx, dword [esi + 0x74]
add dword [esp + 0x10], 0x14
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
cmp edi, eax
jb 0x40c292
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0xc]
mov ecx, dword [esi + 0x84]
push eax
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edi, dword [esi + 0x8c]
test edi, edi
je 0x40c447
test ebx, ebx
je 0x40c410
mov ecx, 1
cmp ebx, 0xffffffff
jne 0x40c382
mov edx, dword [esi + 0x90]
push edx
mov eax, 2
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 0xfffffffe
jne 0x40c39e
mov edx, dword [esi + 0x90]
push edx
mov eax, 5
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 0xfffffffc
jne 0x40c3ba
mov edx, dword [esi + 0x90]
push edx
mov eax, 7
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 0xfffffffb
jne 0x40c3d6
mov edx, dword [esi + 0x90]
push edx
mov eax, 8
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 0xfffffffa
jne 0x40c3f2
mov edx, dword [esi + 0x90]
push edx
mov eax, 9
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x90]
xor eax, eax
cmp ebx, 0xfffffff9
setne al
push edx
lea eax, [eax + eax + 9]
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x94], 0
je 0x40c435
mov edx, dword [esi + 0x90]
push edx
mov eax, 1
mov ecx, 2
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x90]
push edx
xor eax, eax
mov ecx, 1
push eax
push ecx
call edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret