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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x84]
mov edi, dword [esp + 0x78]
mov dword [esp + 0x28], ecx
mov esi, dword [esp + 0x88]
test bl, bl
je 0x511050
test edi, edi
je 0x511290
test esi, esi
jle 0x511044
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + 0x10]
cmp esi, ebx
jg 0x511044
mov ebp, dword [eax + 0x1d]
mov eax, dword [eax + 0x14]
sub esi, 1
imul esi, eax
mov dword [esp + 0x24], eax
mov esi, dword [ebp + esi]
mov dword [esp + 0x34], esi
test esi, esi
je 0x511044
cmp word [esi + 0x12], 0
js 0x511044
movzx eax, word [esi + 0x1a]
sar ax, 5
cwde
mov dword [esp + 0x2c], eax
movzx eax, word [esi + 0x1c]
sar ax, 5
cwde
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x80]
test eax, eax
jle 0x5113f6
mov dword [esp + 0x38], 0xffffffff
xor edx, edx
mov esi, 0x7fffff
lea esi, [esi]
nop
mov eax, dword [esp + 0x7c]
movsx eax, word [eax + edx*2]
cmp eax, ebx
jg 0x511409
test eax, eax
jle 0x511409
sub eax, 1
imul eax, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov ecx, dword [ebp + eax]
movzx eax, word [ecx + 0x1a]
movzx ecx, word [ecx + 0x1c]
sar ax, 5
cwde
sub edi, eax
mov eax, edi
neg eax
cmovs eax, edi
sar cx, 5
mov edi, dword [esp + 0x30]
movsx ecx, cx
sub edi, ecx
mov ecx, edi
neg ecx
cmovs ecx, edi
cmp eax, ecx
cmovl eax, ecx
cmp eax, esi
jge 0x510ed1
mov dword [esp + 0x38], edx
mov esi, eax
add edx, 1
cmp dword [esp + 0x80], edx
jne 0x510e70
mov eax, dword [esp + 0x38]
add eax, eax
mov esi, dword [0x5b5334]
lea edx, [esi + 1]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x7c]
mov dword [0x5b5334], edx
movsx eax, word [esi + eax]
cmp eax, ebx
jg 0x511409
test eax, eax
jle 0x511409
sub eax, 1
imul eax, dword [esp + 0x24]
mov ebp, dword [ebp + eax]
mov eax, dword [0x59ad30]
movzx edi, word [ebp + 0x1c]
movzx ebx, word [ebp + 0x1a]
sar di, 5
sar bx, 5
movsx edi, di
movsx ebx, bx
imul eax, edi
add eax, ebx
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
cmp dword [esp + 0x80], 1
movzx eax, byte [eax + 0xc]
mov byte [esp + 0x2c], al
jle 0x5110d0
mov eax, dword [esp + 0x80]
mov dword [esp + 4], 1
lea esi, [eax + eax]
mov dword [esp], esi
call sub.msvcrt.dll_calloc
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], eax
mov edi, dword [esp + 0x28]
lea eax, [ebx + esi]
xor esi, esi
mov dword [esp + 0x24], eax
jmp 0x510f99
add ebx, 2
cmp dword [esp + 0x24], ebx
je 0x511012
movsx eax, word [ebx]
mov ebp, eax
test eax, eax
jle 0x511400
cmp eax, dword [edi + 0x10]
jg 0x511400
sub eax, 1
imul eax, dword [edi + 0x14]
mov edx, dword [edi + 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
movzx edx, byte [esp + 0x2c]
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
cmp byte [eax + 0xc], dl
jne 0x510ffe
mov eax, dword [esp + 0x38]
mov word [eax + esi*2], bp
mov eax, dword [esp + 0x30]
add esi, 1
mov dword [ecx + 0x29], eax
cmp byte [ecx + 9], 1
jne 0x510f90
call fcn.0052fa60
add ebx, 2
cmp dword [esp + 0x24], ebx
jne 0x510f99
mov ebp, dword [esp + 0x3c]
movzx ebx, word [ebp + 0x1a]
movzx edi, word [ebp + 0x1c]
sar bx, 5
sar di, 5
movsx edi, di
movsx ebx, bx
jmp 0x5110f8
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00565f80
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0x1c
mov ecx, 0x5b8ac0
call fcn.004ba5f0
test eax, eax
je 0x510de5
mov eax, dword [esp + 0x80]
mov dword [esp], 0x25ee
mov ecx, 0x5b8ac0
lea ebx, [eax + eax + 0xa]
mov dword [esp + 4], ebx
sub ebx, 0xa
call fcn.004ba910
sub esp, 8
mov word [eax + 4], si
add eax, 0xa
movzx edx, word [esp + 0x70]
movzx esi, word [esp + 0x80]
mov word [eax - 2], di
mov word [eax - 0xa], dx
movzx edx, word [esp + 0x74]
mov word [eax - 4], si
mov esi, dword [esp + 0x7c]
mov word [eax - 8], dx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
jmp 0x511044
mov dword [esp], 2
call sub.msvcrt.dll_malloc
mov esi, eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x7c]
movzx eax, word [eax]
mov word [esi], ax
mov eax, dword [esp + 0x30]
mov esi, 1
mov dword [ebp + 0x29], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [ecx + 0x29], eax
lea eax, [esp + 0x44]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.005316e0
sub esp, 0x10
mov edx, dword [esp + 0x40]
cmp edx, 0xffffffff
je 0x511038
mov eax, dword [esp + 0x44]
cmp eax, 0xffffffff
je 0x511038
imul eax, dword [0x59ad30]
add eax, edx
imul eax, eax, 0xe
add eax, dword [0x5b39d0]
movzx eax, byte [eax + 0xc]
mov byte [esp + 0x2c], al
test esi, esi
je 0x511038
mov eax, dword [esp + 0x38]
xor ebx, ebx
mov dword [esp + 0x24], eax
lea eax, [eax + esi*2]
mov dword [esp + 0x30], eax
jmp 0x51121c
mov edx, dword [0x59ad30]
add eax, edi
js 0x51127e
cmp edx, ebp
jle 0x51127e
cmp dword [0x59ad2c], eax
jle 0x51127e
imul edx, eax
movzx eax, byte [esp + 0x2c]
add edx, ebp
imul edx, edx, 0xe
add edx, dword [0x5b39d0]
cmp byte [edx + 0xc], al
jne 0x51127e
test byte [edx], 1
je 0x51127e
mov eax, dword [esp + 0x24]
movsx eax, word [eax]
test eax, eax
jle 0x511288
mov esi, dword [esp + 0x28]
cmp eax, dword [esi + 0x10]
jg 0x511288
sub eax, 1
imul eax, dword [esi + 0x14]
mov edx, dword [esi + 0x1d]
mov eax, dword [edx + eax]
mov esi, dword [esp + 0x34]
mov dword [esp + 0xc], ebx
movsx edx, word [esi + 6]
mov dword [esp], ecx
mov ecx, eax
mov dword [esp + 4], edi
mov dword [esp + 8], edx
call fcn.00530ba0
sub esp, 0x10
add dword [esp + 0x24], 2
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x30], eax
je 0x511038
mov esi, 0x18
lea esi, [esi]
add ebx, 1
mov eax, 1
mov dword [esp + 8], 5
mov ecx, 0x5ba360
cmp ebx, 0x1a
mov dword [esp + 4], 5
cmovge ebx, eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x48]
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call fcn.0049a650
sub esp, 0x14
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x4c]
mov ebp, ecx
add ebp, dword [esp + 0x48]
jns 0x511178
sub esi, 1
jne 0x511228
jmp 0x511209
xor eax, eax
jmp 0x5111e8
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp], eax
call fcn.00510130
movsx eax, word [0x5c920e]
sub esp, 0x14
test ax, ax
jne 0x5113ba
movsx eax, word [0x5c9210]
test ax, ax
jne 0x51137a
movsx eax, word [0x5c920c]
test ax, ax
jne 0x51133e
mov eax, dword [0x5c9208]
xor edx, edx
xor ecx, ecx
xor ebx, ebx
mov word [0x5c920c], dx
mov dword [esp], eax
mov word [0x5c920e], cx
mov word [0x5c9210], bx
call fcn.00565f80
mov eax, dword [0x5c9204]
mov dword [esp], eax
call fcn.00565f80
mov eax, dword [0x5c9200]
mov dword [esp], eax
call fcn.00565f80
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret 0x1c
mov dword [esp + 0x10], eax
mov eax, dword [0x5c9200]
movsx ebx, bl
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp], eax
call fcn.0051cb40
sub esp, 0x18
jmp 0x5112f2
mov dword [esp + 0x10], eax
movsx edx, bl
mov ecx, dword [esp + 0x28]
mov eax, dword [0x5c9208]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp], eax
call fcn.00510dc0
sub esp, 0x1c
jmp 0x5112e6
mov dword [esp + 0x10], eax
mov eax, dword [0x5c9204]
movsx edx, bl
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x70]
mov dword [esp], eax
call fcn.0051cb40
sub esp, 0x18
jmp 0x5112d6
mov eax, 0xfffffffe
jmp 0x510ee3
movzx eax, word [0x1c]
ud2
movzx eax, word [0x1a]
ud2