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

Disassembly:
push 0xffffffffffffffff
push 0x56e6ec
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x660038]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xec]
call fcn.00512b20
mov esi, eax
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 1
mov dword [esp + 0x1c], eax
jne 0x510c7f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebx, dword [esi + 0xc]
push 1
lea edi, [esp + 0x40]
mov dword [esp + 0x24], ebx
call fcn.004f0320
lea eax, [esp + 0xa0]
push ebp
lea edi, [ebp + 0x14]
push eax
mov dword [esp + 0xec], 0
call fcn.004d1c20
lea esi, [ebp + 0x28]
lea ecx, [esp + 0x94]
push esi
push ecx
mov ecx, eax
mov byte [esp + 0xf4], 1
call fcn.004d1ce0
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0xc8]
push ecx
mov edi, eax
mov byte [esp + 0xfc], 2
call fcn.004d1bc0
add esp, 0x18
mov dword [esp + 0x18], eax
push 0x8000
lea edi, [esp + 0x7c]
mov byte [esp + 0xe8], 3
call fcn.004f0320
mov edi, eax
mov eax, dword [esp + 0x18]
mov edx, edi
call fcn.004d1b70
test al, al
je 0x510d16
mov edi, dword [esp + 0x18]
cmp dword [edi + 0x10], 0
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
je 0x510d23
neg eax
lea ecx, [esp + 0x78]
mov dword [esp + 0x18], eax
call fcn.004d1a40
lea ecx, [esp + 0xb4]
mov byte [esp + 0xe4], 2
call fcn.004d1a40
lea ecx, [esp + 0x8c]
mov byte [esp + 0xe4], 1
call fcn.004d1a40
lea ecx, [esp + 0xa0]
mov byte [esp + 0xe4], 0
call fcn.004d1a40
lea ecx, [esp + 0x3c]
mov dword [esp + 0xe4], 0xffffffff
call fcn.004d1a40
lea edi, [ebp + 0x44]
call fcn.00512060
lea eax, [ebp + 0x44]
push eax
mov eax, dword [esp + 0x1c]
call fcn.00511ed0
mov eax, dword [ebp + 0x3c]
test eax, eax
jne 0x510dd6
xor edi, edi
cmp dword [esp + 0x1c], edi
jbe 0x510ee8
movzx edx, word [ebx + edi*2]
push edx
mov eax, esi
call fcn.004f3ad0
movzx ecx, word [ebx + edi*2]
push esi
push ecx
lea ecx, [ebp + 0x44]
push ecx
mov ecx, eax
mov edx, ebp
call fcn.00510a40
inc edi
add esp, 0xc
cmp edi, dword [esp + 0x1c]
jb 0x510da8
jmp 0x510ee8
push eax
lea edi, [esp + 0x54]
call fcn.004f0320
mov edx, edi
push edx
lea eax, [esp + 0xcc]
push eax
mov edi, ebp
mov dword [esp + 0xec], 4
call fcn.004d1c20
add esp, 8
push 1
lea ecx, [esp + 0x68]
push ecx
push eax
mov byte [esp + 0xf0], 5
call fcn.004e2f30
lea ecx, [esp + 0xc8]
mov byte [esp + 0xe4], 7
call fcn.004d1a40
lea ecx, [esp + 0x50]
mov byte [esp + 0xe4], 8
call fcn.004d1a40
push 1
lea edx, [esp + 0x2c]
push edx
push esi
call fcn.004e2f30
cmp dword [esp + 0x1c], 0
mov byte [esp + 0xe4], 9
mov dword [esp + 0x18], 0
jbe 0x510ec3
jmp 0x510e64
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
movzx edi, word [ebx + eax*2]
movzx ebx, di
push ebx
mov eax, esi
call fcn.004f3ad0
movzx ecx, ax
push esi
lea eax, [ebp + 0x44]
push edi
push eax
mov edx, ebp
mov dword [esp + 0x30], ecx
call fcn.00510a40
movzx eax, word [esp + 0x30]
add eax, eax
add esp, 0xc
cmp eax, ebx
jl 0x510e9b
sub eax, ebx
lea edx, [esp + 0x28]
push edx
movzx ecx, ax
lea eax, [ebp + 0x44]
push edi
push eax
lea edx, [esp + 0x70]
call fcn.00510a40
mov eax, dword [esp + 0x24]
inc eax
add esp, 0xc
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x1c]
jb 0x510e60
lea ecx, [esp + 0x28]
mov byte [esp + 0xe4], 8
call fcn.004d1a40
lea ecx, [esp + 0x64]
mov dword [esp + 0xe4], 0xffffffff
call fcn.004d1a40
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 4