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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, eax
mov ecx, 0x10
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x50]
mov word [esp + 0x18], 0x203
mov byte [esp + 0x1a], 1
cmp eax, 0x3f
jle 0x40764b
mov dword [esp + 0x50], 0x3f
jmp 0x407657
test eax, eax
jns 0x407657
mov dword [esp + 0x50], 0x20
cmp dword [esp + 0x4c], 0
jge 0x407666
mov dword [esp + 0x4c], 0
push 4
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.0040a200
add esp, 0xc
test eax, eax
js 0x407964
mov esi, dword [ebx + 0xf8]
mov edi, dword [sym.imp.MSVCR100.dll_calloc]
push 0x60
push esi
call edi
mov ecx, dword [ebx + 0xd8]
push 2
push ecx
mov dword [ebx + 0xc974], eax
call edi
lea edx, [esi*4]
push edx
mov dword [ebx + 0xc978], eax
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, dword [ebx + 0x30]
mov edx, dword [ebx + 0x7c]
mov dword [ebx + 0xc97c], eax
mov eax, esi
shr eax, 1
not eax
and eax, 1
mov ecx, eax
mov edi, 1
shl edi, cl
mov ecx, esi
not ecx
and ecx, 1
imul edx, edi
add ecx, eax
add edx, edx
add edx, edx
lea eax, [edx*8]
shr eax, cl
add esp, 0x14
mov dword [ebx + 0xca28], edi
lea ecx, [eax + edx*4]
add ecx, ecx
add ecx, ecx
push ecx
call dword [sym.imp.MSVCR100.dll_malloc]
mov dword [ebx + 0xca2c], eax
lea eax, [ebx + 0xca3c]
lea edx, [ebx + 0x78]
add esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], 3
mov eax, dword [esp + 0xc]
mov edi, dword [eax]
add edi, edi
add edi, edi
lea ecx, [edi + 4]
shl ecx, 6
push ecx
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
test eax, eax
je 0x40775a
mov edx, eax
mov ecx, 0x40
lea esi, [eax + 0x100]
nop
mov dword [edx], esi
add edx, 4
add esi, edi
dec ecx
jne 0x407750
mov edx, dword [esp + 0x10]
mov dword [edx - 0xc], eax
mov eax, dword [esp + 0xc]
mov esi, dword [eax]
add esi, esi
add esi, esi
lea ecx, [esi + 4]
shl ecx, 6
push ecx
call dword [sym.imp.MSVCR100.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x40779a
mov edx, edi
mov ecx, 0x40
lea eax, [edi + 0x100]
mov edi, edi
mov dword [edx], eax
add edx, 4
add eax, esi
dec ecx
jne 0x407790
mov eax, dword [esp + 0x10]
add dword [esp + 0xc], 0x20
mov dword [eax], edi
add eax, 4
dec dword [esp + 0x14]
mov dword [esp + 0x10], eax
jne 0x407724
mov esi, ebx
call fcn.00413260
mov ecx, dword [ebx + 0x3c]
mov al, byte [ebx + 0x38]
mov edx, 1
shl edx, cl
xor esi, esi
mov byte [ebx + 0x31b], al
mov byte [ebx + 0x31a], 1
mov dword [ebx + 0xc988], edx
mov dword [ebx + 0x2ac08], esi
mov dword [ebx + 0x2ac3c], esi
mov byte [ebx + 0x2ac44], 0
mov dword [ebx + 0x2ac58], esi
mov dword [ebx + 0x2aca8], esi
mov dword [ebx + 0x2acac], esi
cmp dword [ebx + 0x34], esi
jle 0x407838
mov eax, dword [ebx + 0xc988]
cmp eax, 0x100
jbe 0x40781b
mov eax, 0x100
mov dword [ebx + 0x2ab68], eax
mov eax, ebx
mov word [ebx + 0x2ab90], 0x101
mov byte [ebx + 0x2ab92], 0
call fcn.0040d7f0
xor eax, eax
mov dword [ebx + 0xc960], eax
push 0x100
mov dword [ebx + 0xc964], eax
call dword [sym.imp.MSVCR100.dll_malloc]
mov dword [ebx + 0xc968], eax
mov dword [ebx + 0xc96c], eax
mov byte [eax], 0
add esp, 4
mov dword [ebx + 0xc970], 0x100
cmp dword [ebx + 0xc974], esi
je 0x40795a
cmp dword [ebx + 0xc978], esi
je 0x40795a
cmp dword [ebx + 0xc97c], esi
je 0x40795a
cmp dword [ebx + 0xca2c], esi
je 0x40795a
cmp dword [ebx + 0xca30], esi
je 0x40795a
cmp dword [ebx + 0xca34], esi
je 0x40795a
cmp dword [ebx + 0xca38], esi
je 0x40795a
cmp dword [ebx + 0xca3c], esi
je 0x40795a
cmp dword [ebx + 0xca40], esi
je 0x40795a
cmp dword [ebx + 0xca44], esi
je 0x40795a
lea eax, [ebx + 0xc9b0]
call fcn.00413e70
mov eax, ebx
call fcn.00407180
xor eax, eax
mov dword [ebx + 0xc99f], eax
mov dword [ebx + 0xc9a3], eax
push 0x5000
lea ecx, [ebx + 0xcfb0]
push 0x4b2ad8
push ecx
mov dword [ebx + 0xc984], 0xfffffffd
mov dword [ebx + 0xc98c], esi
mov dword [ebx + 0xc990], esi
mov dword [ebx + 0xc994], esi
mov dword [ebx + 0xc998], 1
mov word [ebx + 0xc99c], ax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push esi
push ebx
call fcn.00407510
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, ebx
call fcn.00407970
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret