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

Disassembly:
sub esp, 0x7c
mov eax, dword [0x58c780]
xor eax, esp
mov dword [esp + 0x78], eax
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x8c]
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
mov ebp, dword [esp + 0x98]
push esi
push edi
mov edi, dword [esp + 0x94]
push ebp
push ebx
push edi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], 0
mov dword [ecx], 0
call fcn.00409aa0
mov esi, eax
add esp, 0xc
cmp esi, 2
jne 0x40bcdc
cmp dword [edi + 0x10], 0x5e
jne 0x40bcdc
cmp dword [edi + 4], 0
jne 0x40bcdc
mov eax, dword [esp + 0x1c]
push ebp
push ebx
push edi
mov dword [esp + 0x50], 1
call fcn.00409aa0
add esp, 0xc
mov esi, eax
jmp 0x40bce4
mov dword [esp + 0x44], 0
test esi, esi
jl 0x40c077
cmp esi, 0x13
jne 0x40bd33
mov eax, dword [ebp + 0x24]
push ebp
push eax
mov eax, dword [ebx]
call fcn.0040bbd0
add esp, 8
test eax, eax
jne 0x40bd1a
pop edi
lea eax, [esi - 0x79]
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004f3b35
add esp, 0x7c
ret
push ebp
mov edx, 0x586648
call fcn.00409820
add esp, 4
mov dword [edi], 2
mov esi, 2
call fcn.00407790
mov ecx, dword [esp + 0x3c]
mov dword [ecx], eax
test eax, eax
jne 0x40bd5a
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004f3b35
add esp, 0x7c
ret
mov edx, dword [ebx]
mov edi, 3
mov dword [esp + 0x10], eax
mov dword [esp + 0x40], 0
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], edx
cmp esi, 0x13
je 0x40c346
mov edi, edi
mov dword [esp + 0x24], 0
cmp esi, 0x17
ja case.0x40bd98.3
movzx eax, byte [esi + 0x40c41c]
jmp dword [eax*4 + 0x40c3f0]
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov ecx, dword [ecx + 0x18]
push eax
call ecx
add esp, 4
cmp eax, 1
jle 0x40bdc1
mov eax, 1
jmp 0x40c1b0
test eax, eax
jge 0x40c1ae
mov esi, eax
jmp 0x40c041
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 1
mov ebx, dword [esp + 0x14]
je 0x40bef1
mov ecx, dword [ebx + 8]
mov dword [esp + 0x48], ecx
test ecx, ecx
je 0x40bef1
mov cl, byte [ebx + 0x10]
mov edx, dword [esp + 0x18]
mov edi, 1
mov byte [esp + 0x80], cl
cmp dword [eax + 8], edi
mov dword [esp + 0x50], edx
jle 0x40be58
lea esp, [esp]
mov eax, dword [esp + 0x1c]
push ebp
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.00409aa0
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x40c041
cmp esi, 1
jne 0x40be50
mov eax, dword [esp + 0x48]
cmp dword [ebx + 8], eax
jne 0x40be50
mov cl, byte [ebx + 0x10]
mov edx, dword [ebp + 8]
mov byte [esp + edi + 0x80], cl
inc edi
cmp edi, dword [edx + 8]
jl 0x40be10
jmp 0x40be58
mov dword [esp + 0x24], 1
mov eax, dword [ebp + 8]
cmp edi, dword [eax + 0xc]
jl 0x40c2f3
mov edx, dword [eax]
lea ecx, [esp + 0x80]
push ecx
call edx
add esp, 4
cmp edi, eax
jl 0x40c2f3
jle 0x40beb4
mov ecx, dword [esp + 0x50]
mov edi, 1
cmp eax, edi
mov dword [esp + 0x18], ecx
jle 0x40beac
lea esi, [eax - 1]
lea edi, [esi + 1]
mov eax, dword [esp + 0x1c]
push ebp
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.00409aa0
add esp, 0xc
sub esi, 1
jne 0x40be94
mov dword [esp + 0x24], 0
cmp edi, 1
jne 0x40bec8
movzx ebx, byte [esp + 0x80]
xor eax, eax
jmp 0x40c1b9
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
lea ecx, [esp + 0x87]
push ecx
lea edx, [esp + 0x84]
push edx
call eax
mov ebx, eax
mov eax, 1
add esp, 8
mov edi, eax
jmp 0x40c1b9
mov ebx, dword [ebx + 0x10]
xor eax, eax
lea edi, [eax + 1]
jmp 0x40c1b9
mov ecx, dword [esp + 0x14]
mov ebx, dword [ecx + 0x10]
mov edi, 1
jmp 0x40c170
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push ebp
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.0040b700
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x40c041
cmp esi, 1
jne 0x40bf9d
push ebp
mov edx, 0x586644
call fcn.00409820
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0xc]
mov ebx, dword [eax + 0x10]
add esp, 4
mov dword [esp + 0x18], ecx
jmp 0x40c16e
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x10]
mov ecx, dword [ecx + 0x14]
push edx
jmp 0x40bf86
mov eax, dword [esp + 0x1c]
push ebp
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0040b8f0
add esp, 0xc
test eax, eax
jl 0x40c3d9
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + 0x14]
push eax
mov ebx, dword [esp + 0x14]
push ebx
mov eax, ebp
call fcn.0040b480
add esp, 8
test eax, eax
jne 0x40c3d9
push ebp
lea esi, [esp + 0x24]
lea edi, [esp + 0x2c]
lea ecx, [esp + 0x34]
mov edx, ebx
call fcn.0040b9f0
mov esi, eax
add esp, 4
test esi, esi
jne 0x40c041
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
push ebp
lea edx, [esp + 0x1c]
push edx
push eax
mov eax, dword [esp + 0x28]
call fcn.00409aa0
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x40c041
cmp esi, 0x13
jne 0x40bd80
test edi, edi
jne 0x40c01a
mov eax, dword [esp + 0x28]
push ebp
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x30]
push edx
mov edx, dword [esp + 0x1c]
push eax
push edi
lea ecx, [esp + 0x4c]
push ecx
push edi
push edx
lea ebx, [esp + 0x50]
call fcn.0040ba60
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x40c041
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x40c346
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00408840
mov esi, eax
add esp, 8
test esi, esi
je 0x40c31b
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x3c]
cmp eax, dword [ebx]
je 0x40c06c
mov edi, dword [eax + 0x28]
test edi, edi
je 0x40c06c
mov eax, dword [edi]
test eax, eax
je 0x40c063
push eax
call fcn.004f72bf
add esp, 4
push edi
call fcn.004f72bf
add esp, 4
mov edx, dword [ebx]
push edx
call fcn.00407650
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004f3b35
add esp, 0x7c
ret
push ebp
test edi, edi
jne 0x40c0d7
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x24]
push ecx
call fcn.00409aa0
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x40c041
mov edi, 1
mov dword [esp + 0x24], edi
cmp esi, 0x13
je 0x40c169
cmp esi, 0x16
je 0x40c15b
mov ecx, dword [esp + 0x14]
mov esi, dword [ecx]
mov dword [esp + 0x20], edi
jmp 0x40bfdf
cmp edi, 3
jne 0x40c124
mov eax, dword [esp + 0x18]
mov ebx, dword [eax + 0x10]
lea edx, [esp + 0x1c]
push edx
push eax
mov eax, dword [esp + 0x28]
xor edi, edi
call fcn.00409aa0
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x40c041
mov dword [esp + 0x24], 1
cmp esi, 0x14
je 0x40c114
cmp dword [esp + 0x40], edi
je 0x40c170
push ebp
mov edx, 0x586650
call fcn.00409820
add esp, 4
jmp 0x40c170
cmp edi, 1
je 0x40c1a1
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x24]
push ecx
call fcn.00409aa0
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x40c041
mov dword [esp + 0x24], 1
cmp esi, 0x13
je 0x40c169
cmp esi, 0x16
jne 0x40c190
push ebp
mov edx, 0x586650
call fcn.00409820
add esp, 4
mov ebx, 0x2d
xor edi, edi
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
push ebx
call eax
add esp, 4
test eax, eax
jl 0x40bdc9
xor ecx, ecx
cmp eax, 1
setne cl
mov eax, ecx
jmp 0x40c1b9
mov edx, dword [ebp + 0xc]
test dword [edx + 8], 0x800000
je 0x40c2fd
push ebp
mov edx, 0x586650
call fcn.00409820
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x14]
mov ebx, dword [ecx + 0x10]
xor edi, edi
push ebp
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x30]
push ecx
push eax
mov eax, dword [esp + 0x20]
push edi
lea edx, [esp + 0x4c]
push edx
push ebx
push eax
lea ebx, [esp + 0x50]
call fcn.0040ba60
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x40c041
cmp dword [esp + 0x24], eax
je 0x40bfbe
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov esi, dword [ecx]
jmp 0x40bfdf
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push ebp
push ecx
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.0040bc50
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x40c041
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
push edx
push eax
call fcn.00408a60
mov ecx, dword [esp + 0x3c]
push ecx
mov esi, eax
call fcn.00407650
add esp, 0xc
test esi, esi
jne 0x40c041
jmp 0x40bfc2
test edi, edi
jne 0x40c28b
mov ecx, dword [esp + 0x28]
push ebp
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edi
lea edx, [esp + 0x4c]
push edx
push edi
push eax
lea ebx, [esp + 0x50]
call fcn.0040ba60
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x40c041
mov ebx, dword [esp + 0x2c]
mov edi, 3
mov dword [esp + 0x40], 1
mov dword [esp + 0x20], edi
test ebx, ebx
je 0x40c2d7
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x10]
push ecx
push edx
call fcn.00408840
mov esi, eax
add esp, 8
test esi, esi
jne 0x40c041
mov ebx, dword [esp + 0x10]
mov esi, dword [ebx + 0x28]
call fcn.004070a0
mov eax, ebx
call fcn.00407760
jmp 0x40bfc2
mov eax, dword [esp + 0x10]
lea ebx, [esp + 0x54]
mov dword [esp + 0x2c], eax
mov eax, ebx
mov dword [esp + 0x10], ebx
call fcn.00407760
jmp 0x40bfc2
mov esi, 0xffffff32
jmp 0x40c041
mov esi, 0xffffff90
jmp 0x40c041
mov esi, 0xffffff99
jmp 0x40c041
mov esi, 0xfffffff5
jmp 0x40c041
mov eax, dword [esp + 0x10]
mov esi, dword [eax + 0x28]
test esi, esi
je 0x40c33e
mov eax, dword [esi]
test eax, eax
je 0x40c335
push eax
call fcn.004f72bf
add esp, 4
push esi
call fcn.004f72bf
add esp, 4
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x10], ecx
cmp dword [esp + 0x44], 0
mov esi, dword [esp + 0x10]
je 0x40c357
or dword [esi + 4], 1
jmp 0x40c35b
and dword [esi + 4], 0xfffffffe
test byte [esi + 4], 1
je 0x40c3cd
mov edx, dword [ebp + 0xc]
test dword [edx + 8], 0x100000
je 0x40c3cd
xor eax, eax
cmp dword [esi + 0x28], eax
lea edi, [esi + 0x28]
sete al
test eax, eax
je 0x40c391
xor eax, eax
lea ecx, [esi + 8]
cmp dword [ecx], 0
jne 0x40c391
inc eax
add ecx, 4
cmp eax, 8
jl 0x40c381
jmp 0x40c3cd
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x30]
push 0
push 0xa
call ecx
add esp, 8
test eax, eax
je 0x40c3cd
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
push 0xa
call eax
add esp, 4
cmp eax, 1
jne 0x40c3bf
or dword [esi + 8], 0x400
jmp 0x40c3cd
push 0xa
push 0xa
mov eax, edi
call fcn.00408220
add esp, 8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x4c]
mov dword [edx], ecx
xor eax, eax
mov ecx, dword [esp + 0x88]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f3b35
add esp, 0x7c
ret