Function at 0x40cc84
Capabilities:
Link many functions at runtime
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc0
push ebx
push ebp
xor eax, eax
mov dword [esp + 0x40], edx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push 0x4037a8
mov dword [esp + 0x68], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0xa0], 1
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
push 0x4037b4
push ebx
call esi
push 0x4037c4
push ebx
mov dword [esp + 0x1c], eax
call esi
push 0x4037d4
push ebx
mov dword [esp + 0x60], eax
call esi
push 0x4037f0
push ebx
mov dword [esp + 0x44], eax
call esi
push 0x403804
push ebx
mov dword [esp + 0x54], eax
call esi
push 0x403820
push ebx
mov dword [esp + 0x48], eax
call esi
push 0x403838
push ebx
mov dword [esp + 0x4c], eax
call esi
mov dword [esp + 0x6c], eax
cmp dword [esp + 0x14], ebp
je 0x40d1a7
cmp dword [esp + 0x58], ebp
je 0x40d1a7
cmp dword [esp + 0x3c], ebp
je 0x40d1a7
cmp dword [esp + 0x4c], ebp
je 0x40d1a7
cmp dword [esp + 0x40], ebp
je 0x40d1a7
cmp dword [esp + 0x44], ebp
je 0x40d1a7
test eax, eax
je 0x40d1a7
push 0x4038f0
call edi
push 0x4038fc
push eax
mov dword [esp + 0x64], eax
call esi
mov dword [esp + 0x68], eax
test eax, eax
jne 0x40cd98
push 0x403914
push 2
push 0x4c
jmp 0x40d1b0
push 0x403948
call edi
mov ebp, eax
push 0x403954
push ebp
mov dword [esp + 0x80], ebp
call esi
push 0x403960
push ebp
mov dword [esp + 0x2c], eax
call esi
push 0x403974
push ebp
mov edi, eax
call esi
push 0x40398c
push ebp
mov dword [esp + 0x30], eax
call esi
push 0x40399c
push ebp
mov dword [esp + 0x20], eax
call esi
push 0x4039ac
push ebp
mov dword [esp + 0x34], eax
call esi
push 0x4039b4
push ebp
mov dword [esp + 0x40], eax
call esi
push 0x4039c4
push ebp
mov dword [esp + 0x58], eax
call esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x54], eax
test esi, esi
je 0x40d19c
test edi, edi
je 0x40d19c
cmp dword [esp + 0x28], 0
je 0x40d19c
cmp dword [esp + 0x18], 0
je 0x40d19c
cmp dword [esp + 0x2c], 0
je 0x40d19c
cmp dword [esp + 0x38], 0
je 0x40d19c
cmp dword [esp + 0x50], 0
je 0x40d19c
test eax, eax
je 0x40d19c
push 0
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x7c]
push eax
call dword [esp + 0x20]
test eax, eax
jne 0x40d1c2
push eax
push eax
push eax
push 0x403a04
call esi
mov ebp, eax
mov dword [esp + 0x24], ebp
test ebp, ebp
je 0x40d18e
push ebp
call edi
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
je 0x40d187
push 0x8040
xor eax, eax
push eax
push eax
push 2
push 0x7f00
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov esi, eax
test esi, esi
je 0x40cede
lea eax, [esp + 0xac]
push eax
push esi
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
je 0x40cedc
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
jne 0x40cede
xor esi, esi
movzx eax, word [esp + 0xd4]
xor ecx, ecx
test esi, esi
cmovne ecx, eax
movzx ecx, cx
mov dword [esp + 0x60], ecx
movzx eax, cx
test cx, cx
je 0x40cf04
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x40cf1a
push 8
push ebp
call dword [esp + 0x20]
push 0xa
push ebp
mov dword [esp + 0x18], eax
call dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push ebp
mov dword [esp + 0x20], eax
call dword [esp + 0x34]
mov dword [esp + 0x28], eax
test eax, eax
je 0x40d17e
push eax
push edi
call dword [esp + 0x34]
mov dword [esp + 0x70], eax
test eax, eax
je 0x40d176
mov ecx, dword [esp + 0x60]
xor edi, edi
xor ebp, ebp
test cx, cx
je 0x40cf86
mov edx, dword [esp + 0x30]
mov eax, edx
movzx ebp, cx
mov ecx, dword [esp + 0x34]
shr ebp, 1
sub eax, ebp
push 0
cmovns edi, eax
mov eax, ecx
sub eax, ebp
pop ebp
cmovns ebp, eax
sub edx, edi
push 0
pop eax
cmovs edx, eax
sub ecx, ebp
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ecx
jns 0x40cf86
and dword [esp + 0x34], eax
push 0x40cc0020
push ebp
mov ebp, dword [esp + 0x2c]
push edi
mov edi, dword [esp + 0x28]
push ebp
push dword [esp + 0x24]
push dword [esp + 0x24]
push 0
push 0
push edi
call dword [esp + 0x5c]
test eax, eax
je 0x40d16d
test esi, esi
je 0x40cfde
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0xb4]
mov edx, dword [esp + 0x30]
push esi
push 0
pop eax
cmovns eax, ecx
push eax
xor eax, eax
sub edx, dword [esp + 0xb8]
cmovns eax, edx
push eax
push edi
call dword [sym.imp.USER32.dll_DrawIcon]
lea eax, [esp + 0x18]
xor esi, esi
push eax
push esi
push dword [esp + 0x30]
mov dword [esp + 0x24], esi
call dword [esp + 0x48]
test eax, eax
jne 0x40d16d
cmp dword [esp + 0x18], esi
je 0x40d16d
lea eax, [esp + 0x14]
mov dword [esp + 0x10], esi
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x18], esi
push eax
call dword [esp + 0x48]
test eax, eax
jne 0x40d165
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40d165
cmp dword [esp + 0x10], esi
je 0x40d165
add eax, 4
push eax
push 8
push dword [0x42ac50]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40d161
push edi
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [esp + 0x50]
test eax, eax
jne 0x40d0a8
mov ebp, esi
cmp dword [esp + 0x10], esi
jbe 0x40d0a4
mov esi, edi
push dword [esi + 0x30]
push dword [esp + 0x68]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40d08e
inc ebp
add esi, 0x4c
cmp ebp, dword [esp + 0x10]
jb 0x40d06f
xor esi, esi
jmp 0x40d0a4
push 0x10
push esi
lea eax, [esp + 0xc8]
push eax
call fcn.0041863c
xor esi, esi
mov dword [esp + 0x10], esi
mov ebp, dword [esp + 0x24]
mov ecx, edi
call fcn.00418601
cmp dword [esp + 0x10], 0
jne 0x40d161
lea eax, [esp + 0x20]
xor edi, edi
push eax
inc edi
push edi
push esi
call dword [esp + 0x74]
test eax, eax
jne 0x40d161
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40d161
cmp dword [esp + 0x48], 0
mov dword [esp + 0x7c], esi
jbe 0x40d12f
push 0x10
push 0x403a14
lea eax, [esp + 0x88]
push eax
call fcn.0041863c
imul eax, dword [esp + 0x7c], 0x1c
lea ecx, [esp + 0x48]
mov dword [esp + eax + 0x94], 4
imul eax, dword [esp + 0x7c], 0x1c
mov dword [esp + eax + 0x90], edi
imul eax, dword [esp + 0x7c], 0x1c
mov dword [esp + eax + 0x98], ecx
inc dword [esp + 0x7c]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0xc4]
push ecx
push eax
push dword [esp + 0x24]
call dword [esp + 0x7c]
test eax, eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
je 0x40d159
push eax
call dword [ecx + 8]
mov dword [esp + 0x20], esi
jmp 0x40d161
push esi
push esi
push esi
push esi
push eax
call dword [ecx + 0x14]
mov edi, dword [esp + 0x1c]
push dword [esp + 0x18]
call dword [esp + 0x50]
push dword [esp + 0x70]
push edi
call dword [esp + 0x34]
push dword [esp + 0x28]
call dword [esp + 0x54]
mov esi, dword [esp + 0x54]
push edi
call esi
jmp 0x40d18b
mov esi, dword [esp + 0x54]
push ebp
call esi
push dword [esp + 0x74]
call dword [esp + 0x5c]
mov ebp, dword [esp + 0x78]
jmp 0x40d1c2
push 0x4039d0
push 2
push 0x5c
jmp 0x40d1b0
push 0x403850
push 2
push 0x43
push 0x403888
push 0x4038d0
call fcn.0041a5ac
add esp, 0x14
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
je 0x40d1cf
push ebx
call esi
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x40d1da
push eax
call esi
test ebp, ebp
je 0x40d1e1
push ebp
call esi
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret 4