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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov dword [esp + 0x1c], eax
mov eax, dword [eax + 0xcc]
mov dword [esp + 0x24], edx
mov esi, dword [esp + 0x70]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], eax
xor eax, eax
cmp dword [esp + 0x20], edx
jb 0x501753
mov edx, dword [esp + 0x1c]
cmp dword [edx + 0xd0], ecx
jb 0x501753
mov edx, dword [esp + 0x20]
sub edx, dword [esp + 0x24]
cmp esi, edx
ja 0x501753
mov edx, dword [esp + 0x20]
sub edx, ecx
cmp edx, dword [esp + 0x74]
jb 0x501760
cmp esi, 0x8000
ja 0x501760
cmp dword [esp + 0x74], 0x8000
ja 0x501753
mov ebx, dword [esp + 0x1c]
lea ecx, [esi + 7]
and ecx, 0xfffffff8
mov dword [esp + 0x30], ecx
imul ecx, dword [esp + 0x74]
cmp ecx, dword [ebx + 0xb8]
mov dword [esp + 0x3c], ecx
ja 0x501753
mov edi, dword [ebx + 0x94]
test edi, edi
je 0x501764
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax + 0x74]
mov eax, edx
shl eax, 4
or eax, edx
mov edx, dword [ecx + 0x84]
test edx, edx
js 0x501823
mov ecx, eax
neg ecx
shl ecx, 8
sar edx, 0x10
and edx, 0xff
cmp eax, edx
jle 0x5014ce
mov eax, edx
mov ebx, dword [esp + 0x1c]
or eax, ecx
mov word [esp + 0x48], ax
mov edx, dword [ebx + 0x78]
mov eax, edx
shl eax, 4
or eax, edx
mov edx, dword [ebx + 0x88]
test edx, edx
js 0x50183f
mov ecx, eax
neg ecx
shl ecx, 8
sar edx, 0x10
and edx, 0xff
cmp eax, edx
jle 0x501507
mov eax, edx
or eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [esp + 0x4a], ax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x7c]
mov eax, edx
shl eax, 4
or eax, edx
mov edx, dword [ecx + 0x8c]
test edx, edx
js 0x501848
mov ecx, eax
neg ecx
shl ecx, 8
sar edx, 0x10
and edx, 0xff
cmp eax, edx
jle 0x501544
mov eax, edx
mov ebx, dword [esp + 0x1c]
or eax, ecx
mov word [esp + 0x4c], ax
mov edx, dword [ebx + 0x80]
mov eax, edx
shl eax, 4
or eax, edx
mov edx, dword [ebx + 0x90]
test edx, edx
js 0x501851
mov ecx, eax
neg ecx
shl ecx, 8
sar edx, 0x10
and edx, 0xff
cmp eax, edx
jle 0x501580
mov eax, edx
or eax, ecx
mov word [esp + 0x4e], ax
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x1c]
test ebx, ebx
mov ebp, dword [eax + 0xd4]
mov ecx, dword [eax + 0xc0]
mov edx, dword [eax + 0xbc]
je 0x501646
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
imul eax, dword [esp + 0x20]
add eax, dword [esp + 0x24]
mov dword [esp + 0x2c], 0
add ebx, 1
add ebp, eax
mov dword [esp + 0x38], ebx
nop
lea esi, [esi]
xor eax, eax
test esi, esi
je 0x50181c
lea esi, [esi]
movzx ebx, byte [ebp + eax]
movzx ebx, word [esp + ebx*2 + 0x48]
mov byte [edx + eax], bl
shr bx, 8
mov byte [ecx + eax], bl
add eax, 1
cmp esi, eax
jne 0x5015e0
add edx, esi
add ecx, esi
mov edi, esi
cmp dword [esp + 0x30], edi
jle 0x501631
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x30]
xor eax, eax
mov byte [edx + eax], 0
mov byte [ecx + eax], 0
add eax, 1
lea ebx, [eax + edi]
cmp ebp, ebx
jg 0x501611
not edi
mov ebp, dword [esp + 0x34]
add edi, dword [esp + 0x38]
add ecx, edi
add edx, edi
add dword [esp + 0x2c], 1
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x74], eax
je 0x501646
add ebp, dword [esp + 0x20]
jmp 0x5015d0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x74]
add eax, dword [edx + 0xc4]
mov dword [edx + 0xac], esi
mov dword [edx + 0xb4], ebx
mov ebx, dword [esp + 0x28]
mov dword [edx + 0xa4], eax
mov eax, dword [esp + 0x30]
add ebx, dword [edx + 0xc8]
mov dword [edx + 0xb0], ecx
test eax, eax
mov dword [edx + 0xa8], ebx
je 0x50172c
test ecx, ecx
je 0x50172c
mov esi, edx
mov edx, dword [edx + 0xb8]
xor eax, eax
test edx, edx
je 0x5016c2
mov ecx, dword [esi + 0xc0]
cmp byte [ecx], 0
je 0x5016b9
jmp 0x5016c2
cmp byte [ecx + eax], 0
jne 0x5016c2
add eax, 1
cmp eax, edx
nop
jb 0x5016b3
mov ecx, dword [esp + 0x3c]
sub ecx, 1
je 0x5016ed
mov esi, dword [esp + 0x1c]
mov edx, dword [esi + 0xc0]
mov esi, dword [esp + 0x3c]
cmp byte [edx + esi - 1], 0
je 0x5016e8
jmp 0x5016ed
cmp byte [edx + ecx], 0
jne 0x5016ed
sub ecx, 1
jne 0x5016e2
xor edx, edx
div dword [esp + 0x30]
xor edx, edx
mov esi, eax
mov eax, ecx
div dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
lea ebx, [esi + ebx]
mov dword [edx + 0xa8], ebx
lea edx, [eax + 1]
cmp esi, edx
jae 0x50182c
mov ecx, dword [esp + 0x1c]
sub eax, esi
test esi, esi
lea edx, [eax + 1]
mov dword [ecx + 0xb0], edx
jne 0x50185a
mov esi, dword [esp + 0x1c]
mov eax, 1
mov dword [esi + 0xd8], 0
mov dword [esi + 0xdc], 0
mov dword [esi + 0x118], 0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
jmp 0x501753
mov eax, dword [ebx + 0x74]
mov edx, eax
shl edx, 4
or edx, eax
mov eax, dword [ebx + 0x64]
mov ecx, edx
neg ecx
movzx eax, byte [ebx + eax*4 + 0xa]
cmp eax, edx
jle 0x501780
mov eax, edx
mov edx, dword [esp + 0x1c]
shl ecx, 8
or eax, ecx
mov ebx, dword [esp + 0x1c]
mov word [esp + 0x48], ax
mov eax, dword [edx + 0x78]
mov edx, eax
shl edx, 4
or edx, eax
mov eax, dword [ebx + 0x68]
mov ecx, edx
neg ecx
movzx eax, byte [ebx + eax*4 + 0xa]
cmp eax, edx
jle 0x5017b2
mov ebx, dword [esp + 0x1c]
mov eax, edx
mov edx, dword [esp + 0x1c]
shl ecx, 8
or eax, ecx
mov word [esp + 0x4a], ax
mov eax, dword [edx + 0x7c]
mov edx, eax
shl edx, 4
or edx, eax
mov eax, dword [ebx + 0x6c]
mov ecx, edx
neg ecx
movzx eax, byte [ebx + eax*4 + 0xa]
cmp eax, edx
jle 0x5017e0
mov ebx, dword [esp + 0x1c]
mov eax, edx
mov edx, dword [esp + 0x1c]
shl ecx, 8
or eax, ecx
mov word [esp + 0x4c], ax
mov eax, dword [edx + 0x80]
mov edx, eax
shl edx, 4
or edx, eax
mov eax, dword [ebx + 0x70]
mov ecx, edx
neg ecx
movzx eax, byte [ebx + eax*4 + 0xa]
cmp eax, edx
jle 0x50180d
mov eax, edx
shl ecx, 8
or eax, ecx
mov word [esp + 0x4e], ax
jmp 0x501587
xor edi, edi
jmp 0x501601
xor ecx, ecx
xor eax, eax
jmp 0x5014bf
mov ebx, dword [esp + 0x1c]
mov dword [ebx + 0xb0], 0
jmp 0x50172c
xor ecx, ecx
xor eax, eax
jmp 0x5014f8
xor ecx, ecx
xor eax, eax
jmp 0x501535
xor ecx, ecx
xor eax, eax
jmp 0x501571
mov ecx, dword [esp + 0x1c]
imul edx, dword [esp + 0x30]
mov eax, dword [ecx + 0xbc]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x30]
mov dword [esp], eax
imul edx, esi
lea edx, [eax + edx]
mov dword [esp + 4], edx
call sub.msvcrt.dll_memmove
mov ebx, dword [esp + 0x1c]
mov edx, dword [ebx + 0xb4]
mov ecx, dword [ebx + 0xb0]
mov eax, dword [ebx + 0xc0]
imul ecx, edx
imul edx, esi
mov dword [esp], eax
mov dword [esp + 8], ecx
lea edx, [eax + edx]
mov dword [esp + 4], edx
call sub.msvcrt.dll_memmove
jmp 0x50172c