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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x5c
mov eax, dword [esp + 0x74]
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x3c], eax
imul eax, dword [0x59ad30]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], ecx
add eax, esi
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
movzx esi, byte [eax + 0xc]
movsx eax, word [edi]
test eax, eax
jle 0x51cb11
cmp eax, dword [ebx + 0x10]
jg 0x51cb11
sub eax, 1
imul eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x1d]
mov eax, dword [edx + eax]
cmp byte [eax + 8], 0x41
je 0x51caeb
mov eax, dword [esp + 0x34]
lea ebp, [eax + eax]
mov dword [esp], ebp
mov dword [esp + 0x30], ebp
call sub.msvcrt.dll_malloc
mov dword [esp], ebp
mov dword [esp + 0x24], eax
mov dword [0x5c9218], eax
call sub.msvcrt.dll_malloc
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov dword [esp], eax
mov dword [esp + 0x14], eax
mov dword [0x5c9220], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x3c]
mov dword [0x5c921c], edi
mov dword [esp + 0x4c], eax
test edi, edi
js 0x51cac9
mov eax, esi
mov dword [esp + 0x2c], 0
mov esi, edi
movzx eax, al
mov dword [esp + 0x20], eax
lea esi, [esi]
nop
mov eax, dword [esp + 0x30]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [0x5c9214], 0
mov dword [0x5c921c], 0
test esi, esi
jle 0x51cac0
mov eax, dword [0x5b39d0]
mov byte [esp + 0x2a], 0
xor edi, edi
mov byte [esp + 0x2b], 0
mov dword [esp + 0x18], eax
mov eax, dword [0x59ad30]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov edx, eax
lea eax, [eax + esi*2]
xor esi, esi
mov dword [esp + 0x10], eax
jmp 0x51c939
mov eax, dword [esp + 0x14]
mov byte [esp + 0x2a], 1
add edx, 2
mov word [eax + edi*2], cx
add edi, 1
cmp edx, dword [esp + 0x10]
je 0x51c9a3
movsx eax, word [edx]
mov ecx, eax
test eax, eax
jle 0x51cb1a
cmp eax, dword [ebx + 0x10]
jg 0x51cb1a
sub eax, 1
imul eax, dword [ebx + 0x14]
mov ebp, dword [ebx + 0x1d]
mov ebp, dword [ebp + eax]
movzx eax, word [ebp + 0x1c]
movzx ebp, word [ebp + 0x1a]
sar ax, 5
sar bp, 5
cwde
imul eax, dword [esp + 0x1c]
movsx ebp, bp
add eax, ebp
mov ebp, dword [esp + 0x18]
imul eax, eax, 0xe
movzx eax, byte [ebp + eax + 0xc]
cmp eax, dword [esp + 0x20]
jne 0x51c920
mov eax, dword [esp + 0x24]
mov byte [esp + 0x2b], 1
add edx, 2
mov word [eax + esi*2], cx
add esi, 1
cmp edx, dword [esp + 0x10]
jne 0x51c939
cmp byte [esp + 0x2a], 0
je 0x51c9b0
mov dword [0x5c921c], edi
cmp byte [esp + 0x2b], 0
je 0x51cab0
mov dword [0x5c9214], esi
test esi, esi
je 0x51cab0
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], esi
mov ecx, ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call fcn.0051b7a0
mov esi, dword [0x5c9220]
mov eax, dword [0x5c921c]
sub esp, 0x10
mov dword [esp + 0x14], esi
test eax, eax
je 0x51cac0
mov eax, dword [esp + 0x14]
movsx eax, word [eax]
test eax, eax
jle 0x51cb34
cmp eax, dword [ebx + 0x10]
jg 0x51cb34
sub eax, 1
imul eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x1d]
mov ecx, dword [edx + eax]
movzx eax, word [ecx + 0x1c]
movzx edx, word [ecx + 0x1a]
sar ax, 5
sar dx, 5
cwde
imul eax, dword [0x59ad30]
movsx edx, dx
add eax, edx
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
movzx eax, byte [eax + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x4c]
mov dword [esp + 4], eax
lea eax, [esp + 0x48]
mov dword [esp], eax
call fcn.0052cfe0
sub esp, 8
add dword [esp + 0x2c], 1
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x34], eax
mov eax, dword [0x5c9218]
mov dword [esp + 0x24], eax
mov eax, dword [0x5c9220]
mov dword [esp + 0x14], eax
jl 0x51cac9
mov esi, dword [0x5c921c]
jmp 0x51c8b0
mov eax, dword [0x5c921c]
jmp 0x51c9fd
mov eax, dword [0x5c9218]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00565f80
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call fcn.00565f80
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x7c], ecx
mov ecx, ebx
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x70], eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0051b7a0
movzx eax, byte [8]
ud2
cmp byte [esp + 0x2a], 0
je 0x51cb27
mov dword [0x5c921c], edi
cmp byte [esp + 0x2b], 0
je 0x51cb34
mov dword [0x5c9214], esi
movzx eax, word [0x1c]
ud2