Function at 0x5311f0
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, dword [esp + 0x68]
mov ebx, dword [esp + 0x64]
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], ebx
mov dword [esp + 0x2c], eax
call fcn.0052eb10
mov edx, eax
mov dword [esp + 0x3c], eax
test eax, eax
je 0x531230
add esp, 0x4c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
lea esi, [esp + 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.0052f100
mov edx, dword [esp + 0x3c]
test edx, edx
jne 0x53121f
and eax, 0xffff
xor edi, edi
mov dword [esp + 0x28], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0052f470
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x20], eax
test edx, edx
jne 0x53121f
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0052f100
mov edx, dword [esp + 0x3c]
mov ebp, eax
test edx, edx
jne 0x53121f
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0052f100
mov edx, dword [esp + 0x3c]
test edx, edx
jne 0x53121f
mov ecx, dword [esp + 0x70]
cmp dword [esp + 0x20], ecx
je 0x5312b0
inc edi
cmp dword [esp + 0x28], edi
jge 0x531253
mov edx, 1
jmp 0x53121f
mov edx, dword [esp + 0x78]
and ebp, 0xffff
inc ebp
and eax, 0xffff
mov dword [edx], ebp
mov edx, dword [esp + 0x68]
add eax, edx
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0052eb10
mov edx, eax
mov dword [esp + 0x3c], eax
test eax, eax
jne 0x53121f
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov eax, dword [ecx]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 8
mov dword [esp], ecx
call fcn.00530c00
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
test edx, edx
jne 0x53121f
mov edx, dword [esp + 0x78]
mov eax, dword [edx]
test eax, eax
jle 0x5313d9
mov edi, dword [esp + 0x24]
mov dword [esp + 0x20], 0
jmp 0x53139f
mov edx, 2
mov eax, ebx
call fcn.0052ec20
mov dword [esp + 0x3c], eax
test eax, eax
jne 0x5313b6
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0052f470
mov ebp, eax
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x5313b6
mov edx, 4
mov eax, ebx
call fcn.0052ec20
mov dword [esp + 0x3c], eax
test eax, eax
jne 0x5313b6
and ebp, 0xffffff
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x78]
inc eax
mov dword [edi + 4], ebp
mov dword [esp + 0x20], eax
mov eax, dword [ecx]
add edi, 8
cmp eax, dword [esp + 0x20]
jle 0x5313d9
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0052f100
mov word [edi], ax
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x531340
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x5313d0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov dword [esp], ecx
call dword [ecx + 8]
mov edx, dword [esp + 0x3c]
jmp 0x53121f
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
mov dword [esp + 0xc], 0x52aaf0
mov dword [esp + 8], 8
call sub.msvcrt.dll_qsort
mov edx, dword [esp + 0x78]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], ecx
call fcn.00530c00
mov ebp, dword [esp + 0x3c]
test ebp, ebp
jne 0x5313b6
mov ecx, dword [esp + 0x78]
xor edx, edx
mov ebx, dword [esp + 0x24]
mov edi, dword [ecx]
test edi, edi
jle 0x531459
mov esi, dword [ebx + edx*8 + 4]
mov ecx, dword [esp + 0x6c]
add ecx, esi
mov dword [eax + edx*4], ecx
mov ecx, dword [esp + 0x78]
inc edx
cmp dword [ecx], edx
jg 0x531443
mov edx, dword [esp + 0x74]
mov dword [esp + 0x3c], 0
mov dword [edx], eax
jmp 0x5313b6