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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x51f461
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x54d154]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
push esi
push edi
mov eax, dword [0x54d154]
xor eax, esp
push eax
lea eax, [esp + 0xf8]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor edi, edi
mov eax, 0xf
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], edi
mov byte [esp + 0x40], 0
mov dword [esp + 0x100], edi
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], edi
mov byte [esp + 0x5c], 0
mov byte [esp + 0x100], 1
xor eax, eax
cmp dword [ebx + 0x1048], edi
mov dword [esp + 0x34], eax
mov word [esp + 0x38], ax
mov byte [esp + 0x16], al
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], edi
je 0x40c829
movzx ecx, word [ebx + 0x103c]
movzx eax, word [ebx + 0x103e]
add ecx, 4
cmp ecx, eax
jle 0x40c806
call fcn.004b7940
mov dword [0], 0x7d0
movzx eax, word [ebx + 0x103c]
mov ecx, dword [ebx + 0x1034]
movzx edx, ax
mov edx, dword [edx + ecx]
add eax, 4
mov dword [esp + 0x24], edx
mov word [ebx + 0x103c], ax
jmp 0x40c835
lea eax, [esp + 0x24]
push eax
mov eax, ebx
call fcn.0040f970
cmp dword [ebx + 0x1048], edi
je 0x40c884
movzx edx, word [ebx + 0x103c]
movzx ecx, word [ebx + 0x103e]
add edx, 4
cmp edx, ecx
jle 0x40c861
call fcn.004b7940
mov dword [0], 0x7d0
movzx eax, word [ebx + 0x103c]
mov edx, dword [ebx + 0x1034]
movzx ecx, ax
mov ecx, dword [ecx + edx]
add eax, 4
mov dword [esp + 0x18], ecx
mov word [ebx + 0x103c], ax
jmp 0x40c890
lea edx, [esp + 0x18]
push edx
mov eax, ebx
call fcn.0040f970
lea eax, [esp + 0x3c]
mov ecx, ebx
call fcn.0040fff0
mov esi, eax
cmp dword [esi + 0x1048], edi
je 0x40c8ec
movzx ecx, word [esi + 0x103c]
movzx eax, word [esi + 0x103e]
add ecx, 1
cmp ecx, eax
jle 0x40c8c9
call fcn.004b7940
mov dword [0], 0x7d0
movzx eax, word [esi + 0x103c]
mov ecx, dword [esi + 0x1034]
movzx edx, ax
mov dl, byte [edx + ecx]
add eax, 1
mov byte [esp + 0x16], dl
mov word [esi + 0x103c], ax
jmp 0x40c8f8
lea eax, [esp + 0x16]
push eax
mov eax, esi
call fcn.0040fa40
cmp dword [esi + 0x1048], edi
je 0x40c90c
lea ecx, [esp + 0x2c]
push ecx
call fcn.0040fac0
jmp 0x40c918
lea edx, [esp + 0x2c]
push edx
mov eax, esi
call fcn.0040fb10
cmp dword [esi + 0x1048], edi
je 0x40c92c
lea eax, [esp + 0x20]
push eax
call fcn.0040fac0
jmp 0x40c938
lea ecx, [esp + 0x20]
push ecx
mov eax, esi
call fcn.0040fb10
cmp dword [esi + 0x1048], edi
je 0x40c94d
lea edi, [esp + 0x34]
call fcn.0040fb90
xor edi, edi
jmp 0x40c958
lea eax, [esp + 0x34]
mov ecx, esi
call fcn.0040fbe0
lea edx, [esp + 0x34]
push edx
lea esi, [esp + 0x5c]
call fcn.0040ff70
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x400c8], edi
jne 0x40c977
call fcn.004b7940
lea ecx, [esp + 0x74]
call fcn.00401000
mov byte [esp + 0x100], 2
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov esi, 0x10
cmp dword [esp + 0x54], esi
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x78], ecx
jae 0x40c9ab
lea edx, [esp + 0x40]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c9b0
sub eax, edi
push eax
push edx
lea ecx, [esp + 0x88]
call fcn.0040b300
cmp dword [esp + 0x70], esi
mov dx, word [esp + 0x20]
mov al, byte [esp + 0x16]
mov cx, word [esp + 0x2c]
mov word [esp + 0xa0], dx
mov edx, dword [esp + 0x5c]
mov byte [esp + 0x9c], al
mov word [esp + 0x9e], cx
jae 0x40c9fc
lea edx, [esp + 0x5c]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ca01
sub eax, edi
push eax
push edx
lea ecx, [esp + 0xbc]
call fcn.0040b300
lea edi, [esp + 0x74]
mov byte [esp + 0xa2], 0
call fcn.004019c0
mov cl, byte [esp + 0xa2]
mov byte [esp + 0x17], al
test al, al
mov eax, dword [0x552f5c]
push 0
mov byte [esp + 0x23], cl
push eax
je 0x40caae
mov edx, dword [eax]
mov eax, dword [edx + 0x48]
call eax
mov edi, eax
mov ecx, dword [edi + 0x1050]
lea edx, [esp + 0x18]
mov word [ecx], 0xa201
push edx
mov eax, 4
mov ecx, edi
mov byte [esp + 0x1a], 2
call fcn.0040a280
lea eax, [esp + 0x16]
push eax
mov eax, 1
mov ecx, edi
call fcn.0040a280
lea ecx, [esp + 0x17]
push ecx
mov eax, 1
mov ecx, edi
call fcn.0040a280
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebx + 0x1060]
mov edx, dword [ecx]
mov edx, dword [edx + 0x40]
push edi
push eax
push ebx
call edx
jmp 0x40cc38
mov ecx, dword [eax]
mov edx, dword [ecx + 0x48]
call edx
mov ebx, eax
mov eax, dword [ebx + 0x1050]
mov word [eax], 0x6201
cmp dword [esp + 0x70], esi
jb 0x40cad2
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x34], ecx
jmp 0x40cada
lea edx, [esp + 0x5c]
mov dword [esp + 0x34], edx
cmp dword [esp + 0x54], esi
mov edi, dword [esp + 0x40]
jae 0x40cae8
lea edi, [esp + 0x40]
lea eax, [esp + 0x24]
push eax
mov eax, 4
mov ecx, ebx
call fcn.0040a280
lea ecx, [esp + 0x18]
push ecx
mov eax, 4
mov ecx, ebx
call fcn.0040a280
mov esi, ebx
call fcn.0040fee0
mov esi, eax
lea edx, [esp + 0x16]
push edx
mov eax, 1
mov ecx, esi
call fcn.0040a280
lea eax, [esp + 0x2c]
push eax
mov eax, 2
mov ecx, esi
call fcn.0040a280
lea ecx, [esp + 0x20]
push ecx
mov eax, 2
mov ecx, esi
call fcn.0040a280
mov edi, dword [esp + 0x34]
call fcn.0040fee0
mov edi, dword [esp + 0x30]
mov eax, dword [edi + 0x1060]
mov esi, dword [ebp + 0xc]
push esi
push eax
mov eax, dword [esp + 0x20]
call fcn.0040dd10
mov edx, dword [esp + 0x28]
mov eax, dword [edi + 0x1060]
mov ecx, dword [edx + 0x400c8]
mov edx, dword [ecx]
push esi
push eax
mov eax, dword [edx + 0x18]
push ebx
call eax
mov edi, eax
cmp edi, 2
je 0x40cc25
mov eax, dword [0x552f5c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x48]
push 0
push eax
call edx
test edi, edi
mov esi, eax
mov eax, dword [esi + 0x1050]
lea ecx, [esp + 0x18]
mov word [eax], 0xa201
push ecx
mov eax, 4
mov ecx, esi
jne 0x40cbde
mov byte [esp + 0x1a], 6
mov byte [esp + 0x1b], 2
call fcn.0040a280
lea edx, [esp + 0x17]
push edx
mov eax, 1
mov ecx, esi
call fcn.0040a280
lea eax, [esp + 0x16]
jmp 0x40cbfd
mov byte [esp + 0x1b], 1
call fcn.0040a280
lea edx, [esp + 0x17]
push edx
mov eax, 1
mov ecx, esi
call fcn.0040a280
lea eax, [esp + 0x1f]
push eax
mov eax, 1
mov ecx, esi
call fcn.0040a280
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + 0x1060]
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx]
push esi
mov esi, dword [ebp + 0xc]
push esi
push eax
mov eax, dword [edx + 0x40]
call eax
mov eax, dword [0x552f5c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x4c]
push ebx
push eax
call edx
mov esi, 0x10
mov byte [esp + 0x100], 1
lea ecx, [esp + 0x74]
call fcn.00405600
mov byte [esp + 0x100], 0
cmp dword [esp + 0x70], esi
jb 0x40cc64
mov eax, dword [esp + 0x5c]
push eax
call fcn.004e3843
add esp, 4
xor ebx, ebx
mov edi, 0xf
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
mov dword [esp + 0x100], 0xffffffff
cmp dword [esp + 0x54], esi
jb 0x40cc95
mov ecx, dword [esp + 0x40]
push ecx
call fcn.004e3843
add esp, 4
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], 0
mov ecx, dword [esp + 0xf8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.004e3834
mov esp, ebp
pop ebp
ret 0x10