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

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x64]
mov dword [esp + 0x14], 0
test eax, eax
jl 0x512791
mov eax, dword [esp + 0x28]
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
mov esi, dword [esp + 0x48]
push edi
mov edi, dword [esp + 0x64]
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x74]
cmp dword [esp + 0x24], ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x44]
mov edx, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov ecx, esi
jne 0x5123ad
mov ebx, dword [esp + 0x70]
test ebx, ebx
je 0x5123ad
mov dword [esp + 0x10], ebp
mov ebx, esi
jmp 0x5123b9
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x50]
cmp dword [esp + 0x68], 0
je 0x5124e9
xor edx, edx
xor eax, eax
mov dl, byte [esi]
mov al, byte [esi + 1]
shl edx, 1
sub edx, eax
mov eax, dword [esp + 0x48]
shl edx, 1
mov dword [esp + 0x28], edx
xor edx, edx
mov dl, byte [eax]
mov eax, dword [esp + 0x28]
sub eax, edx
xor edx, edx
mov dl, byte [ebx]
mov dword [esp + 0x2c], 1
sub eax, edx
mov edx, dword [esp + 0x44]
test edx, edx
mov dword [esp + 0x20], eax
je 0x512420
cmp eax, 0xff
jle 0x51240b
mov byte [edx], 0xff
jmp 0x51241b
test eax, eax
setl dl
dec edx
and edx, eax
mov eax, edx
mov edx, dword [esp + 0x44]
mov byte [edx], al
inc edx
mov dword [esp + 0x18], edx
xor edx, edx
xor eax, eax
mov dl, byte [edi + ebp]
mov al, byte [esi + 1]
imul edx, eax
xor eax, eax
mov al, byte [esi]
mov esi, eax
xor eax, eax
mov al, byte [ebp]
imul esi, eax
mov eax, dword [esp + 0x48]
shl esi, 2
sub esi, edx
xor edx, edx
mov dl, byte [eax]
mov eax, dword [esp + 0x38]
mov ebp, edx
xor edx, edx
mov dl, byte [eax]
add eax, edi
imul ebp, edx
mov edx, dword [esp + 0x48]
sub esi, ebp
mov dword [esp + 0x48], eax
xor eax, eax
lea ebp, [edx + 1]
mov edx, dword [esp + 0x10]
mov al, byte [edx]
xor edx, edx
mov dl, byte [ebx]
imul eax, edx
mov edx, dword [esp + 0x10]
sub esi, eax
mov eax, dword [esp + 0x20]
inc ebx
add edx, edi
mov dword [esp + 0x38], ebx
test eax, eax
mov dword [esp + 0x10], edx
jle 0x5124d2
mov eax, esi
cdq
idiv dword [esp + 0x20]
mov esi, eax
cmp esi, 0xff
jle 0x5124b4
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x1c]
mov byte [esi], 0xff
add esi, edi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x2c]
jmp 0x512505
test esi, esi
setl al
dec eax
mov edx, dword [esp + 0x1c]
and eax, esi
mov esi, dword [esp + 0x34]
mov byte [esi], al
add esi, edi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x2c]
jmp 0x512505
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x1c]
mov byte [esi], 0
add esi, edi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x2c]
jmp 0x512505
mov ebp, dword [esp + 0x48]
add eax, edi
xor esi, esi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x10]
inc ebp
inc ebx
add eax, edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x78]
cmp esi, eax
jge 0x512656
sub eax, esi
mov dword [esp + 0x20], eax
xor eax, eax
mov al, byte [ecx + 2]
mov esi, eax
xor eax, eax
mov al, byte [ecx + 1]
mov dword [esp + 0x2c], esi
lea eax, [eax + eax*4]
mov esi, eax
mov eax, dword [esp + 0x2c]
sub esi, eax
xor eax, eax
mov al, byte [ebx]
sub esi, eax
xor eax, eax
mov al, byte [ecx]
sub esi, eax
xor eax, eax
mov al, byte [ebp]
sub esi, eax
mov eax, dword [esp + 0x44]
test eax, eax
je 0x512570
cmp esi, 0xff
jle 0x51255e
mov eax, dword [esp + 0x18]
mov byte [eax], 0xff
jmp 0x51256c
mov ebx, dword [esp + 0x18]
test esi, esi
setl al
dec eax
and eax, esi
mov byte [ebx], al
inc dword [esp + 0x18]
xor eax, eax
xor ebx, ebx
mov al, byte [edx]
mov bl, byte [ecx]
imul eax, ebx
add edx, edi
xor ebx, ebx
neg eax
mov bl, byte [edx + edi]
inc ecx
mov dword [esp + 0x2c], ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov dword [esp + 0x1c], edx
mov edi, ebx
mov ebx, dword [esp + 0x2c]
imul ebx, edi
mov dword [esp + 0x2c], ebx
xor ebx, ebx
mov bl, byte [edx]
xor edx, edx
mov dl, byte [ecx]
mov edi, ebx
imul edi, edx
xor ebx, ebx
lea edx, [edi + edi*4]
mov edi, dword [esp + 0x2c]
sub edx, edi
mov edi, dword [esp + 0x48]
mov bl, byte [edi]
mov edi, ebx
xor ebx, ebx
mov bl, byte [ebp]
imul edi, ebx
mov ebx, dword [esp + 0x48]
sub edx, edi
mov edi, dword [esp + 0x64]
add eax, edx
add ebx, edi
xor edx, edx
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0x10]
inc ebp
mov dl, byte [ebx]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x28], ebp
mov ebp, edx
xor edx, edx
mov dl, byte [ebx]
imul ebp, edx
sub eax, ebp
mov ebp, dword [esp + 0x10]
inc ebx
add ebp, edi
test esi, esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x10], ebp
jle 0x51262e
cdq
idiv esi
mov esi, eax
cmp esi, 0xff
jle 0x51261e
mov eax, dword [esp + 0x14]
mov byte [eax], 0xff
jmp 0x512635
mov eax, dword [esp + 0x14]
test esi, esi
setl dl
dec edx
and edx, esi
mov byte [eax], dl
jmp 0x512635
mov edx, dword [esp + 0x14]
mov byte [edx], 0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x28]
add edx, edi
dec eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
jne 0x512517
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x512724
xor eax, eax
mov al, byte [ecx + 1]
mov esi, eax
xor eax, eax
mov al, byte [ebx]
shl esi, 2
sub esi, eax
xor eax, eax
mov al, byte [ecx]
sub esi, eax
xor eax, eax
mov al, byte [ebp]
sub esi, eax
mov eax, dword [esp + 0x44]
test eax, eax
mov dword [esp + 0x20], esi
je 0x5126ae
cmp esi, 0xff
jle 0x51269c
mov eax, dword [esp + 0x18]
mov byte [eax], 0xff
jmp 0x5126ae
test esi, esi
setl al
dec eax
and eax, esi
mov esi, dword [esp + 0x18]
mov byte [esi], al
mov esi, dword [esp + 0x20]
test esi, esi
jle 0x51271d
mov esi, dword [esp + 0x1c]
xor eax, eax
mov al, byte [edx + edi]
xor edx, edx
mov dl, byte [ecx + 1]
imul eax, edx
xor edx, edx
mov dl, byte [esi]
mov esi, edx
xor edx, edx
mov dl, byte [ecx]
xor ecx, ecx
imul esi, edx
mov edx, dword [esp + 0x48]
shl eax, 2
mov cl, byte [edx]
xor edx, edx
mov dl, byte [ebp]
sub eax, esi
imul ecx, edx
mov edx, dword [esp + 0x10]
sub eax, ecx
xor ecx, ecx
mov cl, byte [edx]
xor edx, edx
mov dl, byte [ebx]
imul ecx, edx
sub eax, ecx
cdq
idiv dword [esp + 0x20]
cmp eax, 0xff
jle 0x51270d
mov eax, dword [esp + 0x14]
mov byte [eax], 0xff
jmp 0x512724
mov edx, dword [esp + 0x14]
test eax, eax
setl cl
dec ecx
and ecx, eax
mov byte [edx], cl
jmp 0x512724
mov eax, dword [esp + 0x14]
mov byte [eax], 0
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x54]
mov edx, dword [esp + 0x34]
mov ebp, ecx
mov ebx, dword [esp + 0x5c]
add ecx, esi
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x58]
add edx, ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x4c]
mov esi, ecx
add ecx, ebx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x38], eax
add edx, ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x74]
inc ecx
mov dword [esp + 0x3c], ebp
cmp ecx, edx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x24], ecx
jle 0x51237b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret