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

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x60]
push ebx
push ebp
push edi
mov edi, dword [esp + 0x70]
imul ebp, edi, 0x15d4
push 0xe8
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], 0
add ebp, dword [eax + 0x6c]
mov dword [esp + 0x1c], ebp
mov eax, dword [ebp + 0x1a4]
inc eax
push eax
call sub.MSVCRT.dll_calloc
mov ebx, eax
add esp, 8
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x4a07c1
pop edi
pop ebp
pop ebx
add esp, 0x58
ret
mov ecx, dword [esp + 0x6c]
push esi
mov dword [esp + 0x10], 0
mov al, byte [ecx + 0x10]
mov byte [ebx], al
mov eax, dword [ebp + 0x1a4]
inc eax
test eax, eax
jle 0x4a0d8a
mov esi, dword [esp + 0x6c]
mov eax, edi
mov esi, dword [esi]
cdq
idiv dword [ecx + 0x44]
mov ecx, dword [ecx + 0x38]
imul ecx, edx
mov edi, eax
mov eax, dword [esp + 0x70]
add ecx, dword [eax + 0x30]
cmp ecx, esi
jg 0x4a0803
mov ecx, esi
imul ebp, dword [esp + 0x10], 0xe8
mov esi, dword [esp + 0x6c]
add ebp, ebx
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x24], ebp
mov dword [ebp + 0xc8], ecx
mov eax, dword [eax + 0x3c]
mov ecx, dword [esi + 4]
imul eax, edi
add eax, dword [ebx + 0x34]
mov ebx, dword [esp + 0x14]
cmp eax, ecx
jg 0x4a0835
mov eax, ecx
mov dword [ebp + 0xcc], eax
lea eax, [edx + 1]
mov edx, dword [esp + 0x70]
mov ecx, dword [esi + 8]
imul eax, dword [edx + 0x38]
add eax, dword [edx + 0x30]
cmp eax, ecx
jl 0x4a0852
mov eax, ecx
mov dword [ebp + 0xd0], eax
lea eax, [edi + 1]
imul eax, dword [edx + 0x3c]
mov ecx, dword [esi + 0xc]
add eax, dword [edx + 0x34]
cmp eax, ecx
jl 0x4a086b
mov eax, ecx
mov dword [ebp + 0xd4], eax
mov eax, dword [esi + 0x10]
mov dword [ebp + 0xc0], eax
push 0x10
push dword [esi + 0x10]
call sub.MSVCRT.dll_calloc
add esp, 8
mov dword [ebp + 0xc4], eax
test eax, eax
je 0x4a0d6f
cmp dword [ebp + 0xc0], 0
mov dword [esp + 0x38], 0
jle 0x4a0abf
xor edx, edx
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ecx
lea esp, [esp]
mov ebx, dword [ebp + 0xc4]
add ebx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x64], ebx
mov ecx, dword [ecx + 0x15d0]
add ecx, eax
mov eax, dword [esi + 0x18]
mov dword [esp + 0x34], ecx
mov eax, dword [edx + eax]
mov dword [ebx], eax
mov eax, dword [esi + 0x18]
mov eax, dword [eax + edx + 4]
mov dword [ebx + 4], eax
mov eax, dword [ecx + 4]
mov dword [ebx + 8], eax
shl eax, 4
push eax
call sub.MSVCRT.dll_malloc
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
je 0x4a0d51
mov edi, dword [ebx]
mov eax, dword [ebp + 0xc8]
dec eax
mov esi, dword [ebx + 4]
add eax, edi
mov ecx, dword [ebx + 8]
cdq
idiv edi
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0xcc]
dec eax
add eax, esi
cdq
idiv esi
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0xd0]
dec eax
add eax, edi
cdq
idiv edi
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0xd4]
dec eax
add eax, esi
cdq
idiv esi
mov dword [esp + 0x54], eax
cmp ecx, dword [esp + 0x20]
jle 0x4a095d
mov dword [esp + 0x20], ecx
xor edx, edx
mov dword [esp + 0x2c], edx
test ecx, ecx
jle 0x4a0a7f
mov ecx, dword [esp + 0x34]
xor eax, eax
mov dword [esp + 0x30], eax
lea ebp, [ecx + 0x3b0]
jmp 0x4a0980
mov esi, dword [ebx + 0xc]
add esi, eax
test byte [ecx], 1
je 0x4a099a
mov eax, dword [ebp - 0x84]
mov dword [esi], eax
mov eax, dword [ebp]
mov dword [esi + 4], eax
jmp 0x4a09a7
mov dword [esi], 0xf
mov dword [esi + 4], 0xf
mov ecx, dword [ebx + 8]
mov eax, 1
mov edi, dword [esp + 0x4c]
sub ecx, edx
mov edx, dword [esp + 0x50]
dec ecx
mov ebx, dword [esp + 0x48]
dec edx
shl eax, cl
dec edi
add edx, eax
add edi, eax
sar edx, cl
dec ebx
mov dword [esp + 0x28], edx
add ebx, eax
mov edx, dword [esp + 0x54]
dec edx
sar edi, cl
add edx, eax
sar ebx, cl
sar edx, cl
mov eax, edi
mov ecx, dword [esi + 4]
sar eax, cl
shl eax, cl
mov dword [esp + 0x58], edx
dec edx
mov dword [esp + 0x60], eax
mov eax, 1
shl eax, cl
add edx, eax
mov dword [esp + 0x5c], edi
mov edi, dword [esi]
sar edx, cl
shl edx, cl
cmp ebx, dword [esp + 0x28]
jne 0x4a0a0b
xor eax, eax
jmp 0x4a0a2c
mov ecx, edi
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x28]
dec ecx
add eax, ecx
mov ecx, edi
sar eax, cl
sar ebx, cl
shl eax, cl
shl ebx, cl
sub eax, ebx
sar eax, cl
mov ecx, dword [esi + 4]
mov edi, dword [esp + 0x58]
mov dword [esi + 8], eax
cmp dword [esp + 0x5c], edi
jne 0x4a0a3d
xor edx, edx
jmp 0x4a0a43
sub edx, dword [esp + 0x60]
sar edx, cl
mov dword [esi + 0xc], edx
imul edx, eax
cmp edx, dword [esp + 0x18]
jle 0x4a0a53
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x2c]
add ebp, 4
mov ebx, dword [esp + 0x64]
inc edx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
add eax, 0x10
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
cmp edx, dword [ebx + 8]
jl 0x4a0980
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
inc esi
mov eax, dword [esp + 0x40]
add ecx, 0x10
mov edx, dword [esp + 0x44]
add eax, 0x434
add edx, 0x30
mov dword [esp + 0x38], esi
cmp esi, dword [ebp + 0xc0]
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
jl 0x4a08c0
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
xor ecx, ecx
mov dword [ebp + 0x14], 1
mov dword [ebp + 0x10], edi
mov eax, dword [esi + 0x10]
imul eax, edi
mov dword [esp + 0x44], ecx
mov dword [ebp + 0xc], eax
imul eax, dword [esp + 0x20]
mov dword [ebp + 8], eax
cmp dword [ebx + 0xc0], ecx
jle 0x4a0ba8
xor eax, eax
mov dword [esp + 0x40], eax
mov ebx, dword [ebx + 0xc4]
xor edi, edi
add ebx, eax
mov esi, dword [ebx + 8]
test esi, esi
jle 0x4a0b80
xor ebp, ebp
lea esp, [esp]
mov edx, dword [ebx + 0xc]
mov eax, 1
mov ecx, dword [edx + ebp]
sub ecx, edi
dec ecx
add ecx, esi
dec esi
shl eax, cl
mov ecx, dword [edx + ebp + 4]
mov edx, 1
imul eax, dword [ebx]
sub ecx, edi
add ecx, esi
mov esi, dword [esp + 0x14]
shl edx, cl
imul edx, dword [ebx + 4]
mov ecx, dword [esi + 0xe0]
test ecx, ecx
je 0x4a0b4d
cmp ecx, eax
jge 0x4a0b4d
mov eax, ecx
mov ecx, dword [esp + 0x24]
mov dword [ecx + 0xe0], eax
mov eax, dword [esi + 0xe4]
test eax, eax
je 0x4a0b67
cmp eax, edx
jge 0x4a0b67
mov edx, eax
mov dword [ecx + 0xe4], edx
inc edi
mov esi, dword [ebx + 8]
add ebp, 0x10
cmp edi, esi
jl 0x4a0b10
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov ebx, dword [esp + 0x14]
inc ecx
add eax, 0x10
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
cmp ecx, dword [ebx + 0xc0]
jl 0x4a0af6
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x6c]
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x4a0bd7
mov eax, dword [esp + 0x1c]
push 2
mov eax, dword [eax + 0xc]
imul eax, dword [ebx + 8]
push eax
call sub.MSVCRT.dll_calloc
add esp, 8
mov dword [ebx + 4], eax
test eax, eax
je 0x4a0d6f
mov edx, dword [esp + 0x10]
jmp 0x4a0be0
mov eax, dword [ebp - 0xe4]
mov dword [ebp + 4], eax
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 0x1a8], 0
je 0x4a0d01
mov eax, dword [esp + 0x70]
cmp dword [eax], 0
jne 0x4a0c05
cmp dword [esp + 0x78], 1
jne 0x4a0d01
imul edx, edx, 0x94
add edx, ecx
mov eax, dword [edx + 0x1b0]
mov esi, dword [edx + 0x1b4]
mov dword [edx + 0x1f8], eax
mov eax, dword [esp + 0x10]
add eax, 3
mov dword [edx + 0x200], esi
imul eax, eax, 0x94
cmp dword [esp + 0x10], 0
mov eax, dword [eax + ecx]
mov dword [edx + 0x208], eax
mov eax, dword [edx + 0x1ac]
mov dword [edx + 0x1f4], eax
mov eax, dword [edx + 0x1b8]
mov dword [edx + 0x204], eax
mov eax, dword [edx + 0x1cc]
mov dword [edx + 0x1d0], eax
jle 0x4a0c80
mov eax, dword [edx + 0x16c]
xor ecx, ecx
cmp esi, eax
setle cl
dec ecx
and ecx, eax
mov dword [edx + 0x1f0], ecx
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x6c]
mov dword [edx + 0x1fc], 0
mov dword [edx + 0x20c], edi
mov eax, dword [ebp + 0xc8]
mov dword [edx + 0x210], eax
mov eax, dword [ebp + 0xd0]
mov dword [edx + 0x214], eax
mov eax, dword [ebp + 0xcc]
mov dword [edx + 0x218], eax
mov eax, dword [ebp + 0xd4]
mov dword [edx + 0x21c], eax
mov eax, dword [ebp + 0xe0]
mov dword [edx + 0x220], eax
mov eax, dword [ebp + 0xe4]
mov dword [edx + 0x224], eax
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + 0x1a4]
inc edx
inc eax
mov dword [esp + 0x10], edx
cmp edx, eax
jge 0x4a0d8a
mov ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
jmp 0x4a07e6
imul edx, edx, 0x94
add edx, ecx
mov dword [edx + 0x1f8], 0
mov eax, dword [esi + 0x10]
mov dword [edx + 0x208], eax
mov eax, dword [esp + 0x20]
mov dword [edx + 0x1f4], 0
mov dword [edx + 0x204], eax
mov dword [edx + 0x1f0], 0
mov eax, dword [ecx + 0xc]
mov dword [edx + 0x200], eax
mov eax, dword [ecx + 8]
mov dword [edx + 0x1d0], eax
jmp 0x4a0c84
push dword [esp + 0x74]
push dword [esp + 0x74]
push dword [esp + 0x1c]
call fcn.004a06b0
add esp, 0xc
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x58
ret
push dword [esp + 0x74]
push dword [esp + 0x74]
push ebx
call fcn.004a06b0
add esp, 0xc
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x58
ret
pop esi
pop edi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x58
ret