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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x8c
mov eax, dword [esp + 0xa0]
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x68], esi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0x64], eax
movsx eax, word [eax]
cmp esi, 1
je 0x515301
test eax, eax
jle 0x5153e5
cmp eax, dword [0x5b5310]
jg 0x5153e5
sub eax, 1
imul eax, dword [0x5b5314]
mov edx, dword [0x5b531d]
mov edi, dword [0x59ad30]
mov ebp, dword [esp + 0x3c]
mov esi, dword [0x5b39d0]
mov ecx, dword [edx + eax]
mov edx, dword [esp + 0x38]
movzx eax, word [ecx + 0x1c]
movzx ecx, word [ecx + 0x1a]
imul edx, edi
sar ax, 5
sar cx, 5
cwde
movsx ecx, cx
add edx, ebp
imul eax, edi
imul edx, edx, 0xe
add eax, ecx
imul eax, eax, 0xe
movzx eax, byte [esi + eax + 0xc]
cmp byte [esi + edx + 0xc], al
je 0x514db3
mov edi, dword [esp + 0x68]
mov esi, dword [esp + 0x64]
mov ecx, ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.00510310
sub esp, 8
test edi, edi
jle 0x51520c
lea edi, [esi + edi*2]
jmp 0x514da3
sub eax, 1
imul eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x1d]
mov ecx, dword [ecx + eax]
mov eax, dword [esp + 0x38]
mov dword [esp], ebp
add esi, 2
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call fcn.00520e30
sub esp, 0x14
cmp edi, esi
je 0x51520c
movsx eax, word [esi]
test eax, eax
jle 0x514daf
cmp eax, dword [ebx + 0x10]
jle 0x514d60
xor ecx, ecx
jmp 0x514d6d
mov eax, dword [esp + 0x3c]
xor ebp, ebp
mov dword [0x5c91a4], 0
mov dword [0x5c91a8], 0
mov dword [0x5c91ac], 0
lea edi, [eax + 3]
mov eax, dword [esp + 0x38]
mov dword [0x5c91b0], 0
add eax, 3
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x68]
lea esi, [eax + eax]
lea esi, [esi]
lea esi, [esi]
mov dword [esp + 4], 1
mov dword [esp], esi
call sub.msvcrt.dll_calloc
mov dword [ebp*4 + 0x5c91c0], eax
add ebp, 1
cmp ebp, 8
jne 0x514e00
mov dword [esp], esi
xor esi, esi
call sub.msvcrt.dll_malloc
mov word [0x5c91e0], si
mov dword [0x5c91e4], eax
mov eax, dword [esp + 0x64]
movsx eax, word [eax]
test eax, eax
jle 0x515379
cmp eax, dword [ebx + 0x10]
jg 0x515379
sub eax, 1
imul eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x1d]
mov esi, dword [edx + eax]
mov eax, dword [0x5b5334]
mov dword [esp + 0x1c], 3
mov ecx, ebx
mov dword [esp + 8], edi
lea edx, [eax + 1]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x68]
mov dword [0x5b5334], edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00512c30
mov eax, 0x5c9180
sub esp, 0x20
nop
xor ecx, ecx
mov dword [eax], 0
add eax, 6
mov word [eax - 2], cx
cmp eax, 0x5c91a4
jne 0x514eb0
movsx eax, byte [esi + 8]
mov dword [esp + 0xc], 4
mov ecx, ebx
mov edi, ebx
mov dword [esp + 8], 4
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00512f80
sub esp, 0x14
mov esi, eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x40], 0
test eax, eax
je 0x515380
mov esi, dword [esp + 0x40]
mov dword [esp + 4], 4
mov ecx, edi
mov dword [esp], 4
mov dword [esp + 8], esi
movsx ebx, word [esi + esi + 0x5c91a4]
mov eax, dword [esi*4 + 0x5c91c0]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x44], eax
call fcn.00523fb0
mov ecx, edi
sub esp, 0xc
mov dword [esp + 8], esi
mov dword [esp + 4], 4
mov dword [esp], 4
mov dword [esp + 0x4c], eax
call fcn.00524110
sub esp, 0xc
mov dword [esp + 0x50], eax
test ebx, ebx
je 0x5151d1
mov dword [esp + 0x54], 0x13
mov ebp, edi
nop
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x60], eax
test eax, eax
je 0x515294
mov edi, 0x14
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x28], edi
mov ebp, dword [esp + 0x4c]
jmp 0x514fdc
movsx edi, byte [ebp + 1]
movsx ebx, byte [edx + 1]
add ebp, 1
add edx, 1
lea ecx, [ebx + 1]
lea esi, [edi + 1]
mov dword [esp + 0x2c], ecx
lea ecx, [esi + esi*2]
cmp byte [ebx + ecx*2 + 0x5c9181], 0
je 0x515038
sub dword [esp + 0x28], 1
je 0x515038
add eax, 1
cmp eax, 0x14
jne 0x514fb0
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x30]
mov dword [esp + 4], 4
mov dword [esp], 4
mov dword [esp + 8], edi
mov ecx, esi
call fcn.00523fb0
mov ecx, esi
sub esp, 0xc
mov ebp, eax
mov dword [esp + 8], edi
mov dword [esp + 4], 4
mov dword [esp], 4
call fcn.00524110
movsx edi, byte [ebp]
movsx ebx, byte [eax]
mov edx, eax
sub esp, 0xc
xor eax, eax
jmp 0x514fbe
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x48], edi
add eax, ebx
add edi, dword [esp + 0x3c]
mov dword [esp + 0x4c], ebp
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], eax
test edx, edx
jle 0x515108
mov edi, 0x7ffffff
mov dword [esp + 0x58], esi
xor eax, eax
mov esi, edi
mov dword [esp + 0x5c], ebx
mov edi, dword [esp + 0x44]
jmp 0x5150a2
lea edx, [edx + edx*4]
lea edx, [ecx + edx*2]
cmp edx, esi
jge 0x515099
mov word [esp + 0x36], ax
mov esi, edx
add eax, 1
cmp dword [esp + 0x24], eax
je 0x515100
movsx edx, word [edi + eax*2]
test edx, edx
jle 0x5153dc
cmp edx, dword [ebp + 0x10]
jg 0x5153dc
sub edx, 1
imul edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1d]
mov ebx, dword [esp + 0x28]
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 + 0x30]
movsx ecx, cx
sub ebx, ecx
mov ecx, ebx
neg ecx
cmovs ecx, ebx
cmp edx, ecx
jge 0x515088
lea ecx, [ecx + ecx*4]
lea edx, [edx + ecx*2]
jmp 0x51508e
mov esi, dword [esp + 0x58]
mov ebx, dword [esp + 0x5c]
movsx eax, word [esp + 0x36]
mov edi, dword [esp + 0x44]
lea ecx, [edi + eax*2]
movsx eax, word [ecx]
test eax, eax
jle 0x515220
cmp eax, dword [ebp + 0x10]
jg 0x515220
sub eax, 1
imul eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1d]
mov edi, dword [edx + eax]
sub dword [esp + 0x24], 1
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x24]
movzx eax, word [edx + eax*2]
mov word [ecx], ax
mov eax, dword [esp + 0x48]
mov ecx, edi
mov dword [esp + 0x10], 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov byte [0x5b9000], 0
mov dword [esp], eax
call fcn.00520e30
sub esp, 0x14
cmp byte [0x5b9000], 3
lea edx, [esp + 0x7c]
je 0x515230
mov dword [esp + 0x14], edx
movsx eax, byte [edi + 8]
mov ecx, ebp
mov dword [esp + 0xc], 4
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.005128b0
sub esp, 0x18
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x514f80
mov edi, ebp
add dword [esp + 0x40], 1
mov eax, dword [esp + 0x40]
cmp eax, 8
jne 0x514f0f
xor ebx, ebx
lea esi, [esi]
mov eax, dword [ebx*4 + 0x5c91c0]
add ebx, 1
mov dword [esp], eax
call fcn.00565f80
cmp ebx, 8
jne 0x5151e8
mov eax, dword [0x5c91e4]
mov dword [esp], eax
call fcn.00565f80
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret 0x14
xor edi, edi
jmp 0x515135
lea eax, [esi + esi*2]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x1c], edx
mov ecx, ebp
mov byte [esi + eax*2 + 0x5c9180], 1
mov eax, dword [esp + 0x60]
sub eax, 1
mov dword [esp + 0x7c], eax
movsx eax, byte [edi + 8]
mov dword [esp + 0x14], 4
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], 4
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00513130
sub esp, 0x20
lea edx, [esp + 0x7c]
jmp 0x51518e
movsx eax, word [esp + 0x68]
mov dword [esp + 0x14], 3
mov ecx, ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0xc], eax
movsx eax, word [esp + 0x6c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00513700
sub esp, 0x18
mov ebx, dword [esp + 0x60]
lea esi, [esi]
nop
mov eax, dword [ebx*4 + 0x5c91c0]
add ebx, 1
mov dword [esp], eax
call fcn.00565f80
cmp ebx, 8
jne 0x5152d8
mov eax, dword [0x5c91e4]
mov dword [esp], eax
call fcn.00565f80
jmp 0x51520c
mov edx, dword [0x5b5334]
lea ecx, [edx + 1]
test eax, eax
jle 0x5153ee
cmp eax, dword [ebx + 0x10]
jg 0x5153ee
sub eax, 1
imul eax, dword [ebx + 0x14]
mov ebx, dword [ebx + 0x1d]
mov esi, dword [esp + 0x38]
mov eax, dword [ebx + eax]
mov dword [0x5b5334], ecx
mov dword [eax + 0x29], edx
mov ecx, eax
mov dword [esp + 0xa4], esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0xb0], 1
mov dword [esp + 0xa0], esi
mov dword [esp + 0xac], 0
mov dword [esp + 0xa8], 0
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00520e30
xor esi, esi
jmp 0x514e5a
movsx eax, word [esp + 0x68]
mov dword [esp + 0x14], 3
mov ecx, ebx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0xc], eax
movsx eax, word [esp + 0x6c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.00513700
sub esp, 0x18
lea esi, [esi]
nop
mov eax, dword [esi*4 + 0x5c91c0]
add esi, 1
mov dword [esp], eax
call fcn.00565f80
cmp esi, 8
jne 0x5153c0
jmp 0x5151ff
movzx eax, word [0x1a]
ud2
movzx eax, word [0x1c]
ud2
mov dword [0x5b5334], ecx
mov dword [0x29], 0
ud2