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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
mov edx, eax
mov dword [esp + 0x30], eax
mov eax, dword [eax + 4]
mov dword [esp + 8], 0x58
mov dword [esp + 4], 1
mov dword [esp], edx
call dword [eax]
mov ecx, dword [esp + 0x30]
cmp dword [ecx + 0x78], 4
mov dword [ecx + 0x204], eax
mov dword [eax], 0x516c40
mov dword [eax + 8], 0x516c10
mov dword [eax + 0xc], 0x516c20
mov dword [eax + 0x44], 0
mov dword [eax + 0x34], 0
jle 0x517272
mov eax, dword [ecx]
mov dword [eax + 0x18], 4
mov dword [eax + 0x14], 0x37
mov eax, dword [ecx]
mov dword [esp], ecx
call dword [eax]
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0x60]
mov dword [esp + 0x1c], eax
cmp eax, 0x100
jle 0x5172aa
mov edx, dword [esp + 0x30]
mov eax, dword [edx]
mov dword [eax + 0x18], 0x100
mov dword [eax + 0x14], 0x39
mov eax, dword [edx]
mov dword [esp], edx
call dword [eax]
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0x60]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
mov esi, 1
mov eax, dword [eax + 0x204]
mov ebp, eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x30]
add ebp, 0x20
mov ebx, dword [eax + 0x78]
lea ecx, [esi + 1]
cmp ebx, 1
mov edx, ecx
jle 0x5172e0
mov eax, 1
inc eax
imul edx, ecx
cmp eax, ebx
jne 0x5172d8
cmp edx, dword [esp + 0x1c]
jg 0x5172ea
mov esi, ecx
jmp 0x5172c9
cmp esi, 1
je 0x517501
test ebx, ebx
jle 0x517520
mov eax, ebp
lea edx, [ebp + ebx*4]
mov dword [esp + 0x20], 1
mov ecx, 1
mov dword [eax], esi
add eax, 4
imul ecx, esi
cmp eax, edx
jne 0x51730e
mov dword [esp + 0x20], ecx
xor esi, esi
xor edi, edi
cmp ebx, esi
jle 0x517361
mov edx, dword [esp + 0x30]
mov eax, esi
cmp dword [edx + 0x2c], 2
je 0x5174b8
lea ecx, [ebp + eax*4]
mov eax, dword [esp + 0x20]
mov edx, eax
sar edx, 0x1f
idiv dword [ecx]
mov edx, dword [ecx]
inc edx
imul eax, edx
cmp eax, dword [esp + 0x1c]
jg 0x517361
inc esi
mov dword [ecx], edx
mov dword [esp + 0x20], eax
mov edi, 1
cmp ebx, esi
jg 0x517326
test edi, edi
jne 0x51731e
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
cmp dword [eax + 0x78], 3
je 0x5174c4
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x20]
mov eax, dword [ecx]
mov dword [eax + 0x18], ebx
mov dword [eax + 0x14], 0x5f
mov eax, dword [ecx]
mov dword [esp + 4], 1
mov dword [esp], ecx
call dword [eax + 4]
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0x20]
mov ecx, edx
xor esi, esi
mov eax, dword [edx + 4]
mov edx, dword [edx + 0x78]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], ecx
mov dword [esp + 4], 1
call dword [eax + 8]
mov ecx, eax
mov eax, dword [esp + 0x30]
mov ebx, dword [eax + 0x78]
test ebx, ebx
jle 0x51748f
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
mov edx, eax
sar edx, 0x1f
mov edi, dword [ebx + esi*4 + 0x20]
idiv edi
mov ebx, eax
test edi, edi
jle 0x51747d
mov eax, edi
lea edx, [edi - 1]
shl eax, 8
mov dword [esp + 0x34], edx
sub eax, edi
mov dword [esp + 0x2c], 0
sar edx, 1
add eax, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov edx, eax
sar edx, 0x1f
idiv dword [esp + 0x34]
mov edx, dword [esp + 0x24]
cmp ebp, edx
jge 0x51745b
test ebx, ebx
jle 0x51744f
mov edx, ebp
lea edi, [ebp + ebx]
mov dword [esp + 0x1c], ebx
nop
mov ebx, dword [ecx + esi*4]
mov byte [ebx + edx], al
inc edx
cmp edi, edx
jne 0x517440
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add ebp, edx
cmp ebp, dword [esp + 0x24]
jl 0x517430
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
add eax, ebx
add ebp, 0xff
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x28], eax
jne 0x517417
mov eax, dword [esp + 0x30]
inc esi
mov dword [esp + 0x20], ebx
cmp esi, dword [eax + 0x78]
jl 0x5173d8
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x10], ecx
mov ecx, dword [esp + 0x24]
mov dword [ebx + 0x14], ecx
call fcn.00516750
mov eax, dword [esp + 0x30]
cmp dword [eax + 0x58], 2
je 0x51752d
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi*4 + 0x718840]
jmp 0x517336
mov eax, dword [eax]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
mov dword [eax + 0x18], ecx
mov edx, dword [ebx + 0x20]
mov dword [eax + 0x1c], edx
mov edx, dword [ebx + 0x24]
mov dword [eax + 0x20], edx
mov edx, dword [ebx + 0x28]
mov dword [eax + 0x14], 0x5e
mov dword [eax + 0x24], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 4], 1
mov dword [esp], edx
call dword [eax + 4]
jmp 0x51739f
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov dword [eax + 0x18], edx
mov dword [eax + 0x14], 0x38
mov eax, dword [ecx]
mov dword [esp], ecx
call dword [eax]
test ebx, ebx
jg 0x5172fb
mov dword [esp + 0x20], 1
jmp 0x51731e
mov eax, dword [esp + 0x30]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00516bc0