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

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x9c
mov eax, dword [esp + 0xb0]
mov esi, dword [esp + 0xc0]
mov edx, dword [esp + 0xb8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x70], eax
movsx eax, word [eax]
cmp esi, 1
je 0x514310
test eax, eax
jle 0x514300
cmp dword [0x5b5310], eax
jl 0x514300
sub eax, 1
imul eax, dword [0x5b5314]
mov ecx, dword [0x5b531d]
mov ebx, dword [ecx + eax]
movsx eax, dx
mov dword [esp + 0x74], eax
test eax, eax
jle 0x5142f0
cmp eax, dword [0x5b5310]
jg 0x5142f0
sub eax, 1
imul eax, dword [0x5b5314]
mov edx, dword [0x5b531d]
mov ebp, dword [edx + eax]
movzx eax, word [ebx + 0x1c]
mov ecx, dword [0x59ad30]
mov edx, dword [esp + 0x40]
mov esi, dword [0x5b39d0]
sar ax, 5
cwde
imul edx, ecx
add edx, dword [esp + 0x48]
imul eax, ecx
movzx ecx, word [ebx + 0x1a]
imul edx, edx, 0xe
sar cx, 5
movsx ecx, cx
add eax, ecx
imul eax, eax, 0xe
movzx eax, byte [esi + eax + 0xc]
cmp byte [esi + edx + 0xc], al
jne 0x513e88
movzx eax, byte [ebx + 8]
cmp byte [ebp + 8], al
jne 0x513e88
mov eax, dword [esp + 0x74]
test eax, eax
jle 0x514444
mov eax, dword [esp + 0x74]
cmp eax, dword [0x5b5310]
jg 0x514444
sub eax, 1
imul eax, dword [0x5b5314]
mov edx, dword [0x5b531d]
mov eax, dword [edx + eax]
mov dword [esp + 0x78], eax
mov eax, dword [eax + 0x1e]
movsx esi, word [eax + 0xe]
movsx ecx, word [eax + 0x10]
mov dword [esp + 8], 0
mov ebx, esi
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x48]
mov ebp, ecx
mov dword [esp + 4], ecx
movzx eax, byte [ecx + ebx*4 + 0x5aaa3f]
lea esi, [ebx + esi - 1]
mov dword [esp], ebx
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x40]
mov dword [esp + 0x4c], ecx
lea esi, [ecx + esi - 1]
mov ecx, edi
mov byte [esp + 0x7f], al
call fcn.00523fb0
mov ecx, edi
sub esp, 0xc
mov dword [esp + 4], ebp
xor ebp, ebp
mov dword [esp], ebx
mov dword [esp + 8], 0
call fcn.00524110
mov dword [0x5c91a4], 0
mov dword [0x5c91a8], 0
sub esp, 0xc
mov dword [0x5c91ac], 0
mov eax, dword [esp + 0x6c]
mov dword [0x5c91b0], 0
lea ebx, [eax + eax]
nop
mov dword [esp + 4], 1
mov dword [esp], ebx
call sub.msvcrt.dll_calloc
mov dword [ebp*4 + 0x5c91c0], eax
add ebp, 1
cmp ebp, 8
jne 0x513d30
mov dword [esp], ebx
xor ebp, ebp
call sub.msvcrt.dll_malloc
mov dword [esp + 0x1c], 1
mov ecx, edi
mov dword [0x5c91e4], eax
mov eax, dword [0x5b5334]
mov dword [esp + 0xc], esi
lea edx, [eax + 1]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x6c]
mov dword [0x5b5334], edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x70]
mov word [0x5c91e0], bp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.00512c30
mov eax, 0x5c9180
mov edx, 0x5c91a4
sub esp, 0x20
nop
xor ebx, ebx
mov dword [eax], 0
add eax, 6
mov word [eax - 2], bx
cmp edx, eax
jne 0x513dc0
mov eax, dword [esp + 0x78]
mov ecx, edi
mov ebp, edi
movsx eax, byte [eax + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.00512f80
sub esp, 0x14
mov ebx, eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x44], 0
test eax, eax
je 0x514388
mov eax, dword [esp + 0x44]
movsx eax, word [eax + eax + 0x5c91a4]
mov dword [esp + 0x30], eax
test eax, eax
jne 0x513f10
add dword [esp + 0x44], 1
mov eax, dword [esp + 0x44]
cmp eax, 8
jne 0x513e23
xor ebx, ebx
lea esi, [esi]
nop
mov eax, dword [ebx*4 + 0x5c91c0]
add ebx, 1
mov dword [esp], eax
call fcn.00565f80
cmp ebx, 8
jne 0x513e50
mov eax, dword [0x5c91e4]
mov dword [esp], eax
call fcn.00565f80
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret 0x14
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x70]
mov ecx, edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.00510310
sub esp, 8
test ebx, ebx
jle 0x513e74
mov eax, edi
lea ebx, [esi + ebx*2]
mov edi, esi
mov ebp, dword [esp + 0x48]
mov esi, eax
jmp 0x513efb
sub eax, 1
imul eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x1d]
mov ecx, dword [ecx + eax]
mov eax, dword [esp + 0x40]
mov dword [esp], ebp
add edi, 2
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call fcn.0051f4f0
sub esp, 0x14
cmp ebx, edi
je 0x513e74
movsx eax, word [edi]
test eax, eax
jle 0x513f07
cmp eax, dword [esi + 0x10]
jle 0x513eb8
xor ecx, ecx
jmp 0x513ec5
mov edi, dword [esp + 0x44]
movsx eax, byte [esp + 0x7f]
mov ecx, ebp
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
lea esi, [eax - 1]
mov eax, dword [edi*4 + 0x5c91c0]
mov dword [esp + 8], edi
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00523fb0
mov ecx, ebp
sub esp, 0xc
mov dword [esp + 8], edi
mov edi, dword [esp + 0x38]
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [esp + 0x54], eax
call fcn.00524110
sub esp, 0xc
mov dword [esp + 0x58], eax
movsx eax, byte [eax]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x8c]
movsx edi, byte [edi]
mov dword [esp + 0x68], eax
test eax, eax
je 0x51420a
lea esi, [esi]
mov ecx, dword [esp + 0x2c]
xor ebx, ebx
test ecx, ecx
jle 0x514048
mov dword [esp + 0x34], ebp
mov eax, dword [esp + 0x58]
mov ebp, dword [esp + 0x54]
jmp 0x513fd5
movsx edi, byte [ebp + 1]
movsx ecx, byte [eax + 1]
add ebp, 1
add eax, 1
lea edx, [edi + edi*2 + 3]
cmp byte [ecx + edx*2 + 0x5c9181], 0
je 0x514038
add ebx, 1
cmp dword [esp + 0x2c], ebx
je 0x514038
add esi, 1
cmp dword [esp + 0x2c], esi
jg 0x513fb0
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00523fb0
sub esp, 0xc
mov ebp, eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00524110
movsx edi, byte [ebp]
movsx ecx, byte [eax]
sub esp, 0xc
lea edx, [edi + edi*2 + 3]
cmp byte [ecx + edx*2 + 0x5c9181], 0
jne 0x513fcc
lea esi, [esi]
mov dword [esp + 0x58], eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ebp
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x30]
add eax, edi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x50]
add eax, dword [esp + 0x40]
mov dword [esp + 0x3c], eax
test edx, edx
jle 0x514108
mov ebx, 0x7ffffff
mov dword [esp + 0x60], esi
xor eax, eax
mov dword [esp + 0x64], edi
mov esi, ebx
mov edi, dword [esp + 0x5c]
jmp 0x5140a2
lea edx, [edx + edx*4]
lea edx, [ecx + edx*2]
cmp edx, esi
jge 0x514099
mov word [esp + 0x7c], ax
mov esi, edx
add eax, 1
cmp eax, dword [esp + 0x30]
je 0x514100
movsx edx, word [edi + eax*2]
test edx, edx
jle 0x5143f6
cmp edx, dword [ebp + 0x10]
jg 0x5143f6
sub edx, 1
imul edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1d]
mov ebx, dword [esp + 0x34]
mov ecx, dword [ecx + edx]
movzx edx, word [ecx + 0x1a]
movzx ecx, word [ecx + 0x1c]
sar dx, 5
movsx edx, dx
sub ebx, edx
mov edx, ebx
neg edx
cmovs edx, ebx
sar cx, 5
mov ebx, dword [esp + 0x3c]
movsx ecx, cx
sub ebx, ecx
mov ecx, ebx
neg ecx
cmovs ecx, ebx
cmp edx, ecx
jge 0x514088
lea ecx, [ecx + ecx*4]
lea edx, [edx + ecx*2]
jmp 0x51408e
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
movsx eax, word [esp + 0x7c]
mov edx, dword [esp + 0x5c]
sub dword [esp + 0x30], 1
mov ebx, dword [esp + 0x30]
lea ecx, [edx + eax*2]
movzx ebx, word [edx + ebx*2]
movsx eax, word [ecx]
mov word [esp + 0x34], bx
test eax, eax
jle 0x5143ff
cmp eax, dword [ebp + 0x10]
jg 0x5143ff
sub eax, 1
imul eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1d]
mov ebx, dword [edx + eax]
movzx eax, word [esp + 0x34]
mov word [ecx], ax
mov eax, dword [esp + 0x50]
mov ecx, ebx
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov byte [0x5b9000], 0
mov dword [esp], eax
call fcn.0051f4f0
movsx eax, word [0x5c91e0]
movzx ecx, word [ebx + 6]
sub esp, 0x14
lea edx, [eax + 1]
mov word [0x5c91e0], dx
mov edx, dword [0x5c91e4]
mov word [edx + eax*2], cx
cmp byte [0x5b9000], 3
je 0x514280
lea eax, [esp + 0x8c]
mov ecx, ebp
mov dword [esp + 0x14], eax
movsx eax, byte [ebx + 8]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.005128b0
sub esp, 0x18
mov eax, dword [esp + 0x30]
test eax, eax
je 0x513e3b
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x68], eax
test eax, eax
jne 0x513f90
movsx eax, word [esp + 0x6c]
mov dword [esp + 0x14], 1
mov ecx, ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.00513700
sub esp, 0x18
mov ebx, dword [esp + 0x68]
lea esi, [esi]
nop
mov eax, dword [ebx*4 + 0x5c91c0]
add ebx, 1
mov dword [esp], eax
call fcn.00565f80
cmp ebx, 8
jne 0x514250
mov eax, dword [0x5c91e4]
mov dword [esp], eax
call fcn.00565f80
jmp 0x513e74
mov ecx, dword [esp + 0x50]
lea eax, [edi + edi*2 + 3]
mov byte [ecx + eax*2 + 0x5c9181], 1
mov eax, dword [esp + 0x68]
sub eax, 1
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x8c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x78]
movsx eax, byte [eax + 8]
mov dword [esp + 0xc], ecx
mov ecx, ebp
mov dword [esp + 8], edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.00513130
sub esp, 0x20
jmp 0x5141af
xor ebp, ebp
jmp 0x513c10
xor ebx, ebx
jmp 0x513be2
mov edx, dword [0x5b5334]
lea ecx, [edx + 1]
test eax, eax
jle 0x5143e4
cmp dword [edi + 0x10], eax
jl 0x5143e4
sub eax, 1
imul eax, dword [edi + 0x14]
mov ebx, dword [edi + 0x1d]
mov esi, dword [esp + 0x40]
mov eax, dword [ebx + eax]
mov dword [0x5b5334], ecx
mov dword [eax + 0x29], edx
mov ecx, eax
mov dword [esp + 0xb4], esi
mov esi, dword [esp + 0x48]
mov dword [esp + 0xc0], 1
mov dword [esp + 0xb0], esi
mov dword [esp + 0xbc], 0
mov dword [esp + 0xb8], 0
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0051f4f0
movsx eax, word [esp + 0x6c]
mov dword [esp + 0x14], 1
mov ecx, edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.00513700
sub esp, 0x18
lea esi, [esi]
mov eax, dword [ebx*4 + 0x5c91c0]
add ebx, 1
mov dword [esp], eax
call fcn.00565f80
cmp ebx, 8
jne 0x5143c8
jmp 0x513e67
mov dword [0x5b5334], ecx
mov dword [0x29], 0
ud2
movzx eax, word [0x1a]
ud2
movzx edx, word [esp + 0x34]
mov eax, dword [esp + 0x50]
mov word [ecx], dx
xor ecx, ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], 1
mov dword [esp], eax
mov byte [0x5b9000], 0
call fcn.0051f4f0
movzx eax, word [6]
sub esp, 0x14
ud2
mov eax, dword [0x1e]
ud2