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

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x94]
mov dword [esp + 0x44], 0
test eax, eax
jl 0x511a90
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x54]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x94]
inc eax
add ecx, edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x54]
cmp edx, eax
jne 0x511398
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x511398
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x7c]
jmp 0x5113a3
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x80]
mov esi, dword [esp + 0x98]
test esi, esi
je 0x511459
mov esi, dword [esp + 0x78]
xor ebx, ebx
mov bl, byte [esi]
mov esi, ebx
xor ebx, ebx
mov bl, byte [ecx]
add ecx, edi
mov ebp, ebx
mov ebx, dword [esp + 0x78]
imul ebp, esi
inc ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x7c]
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0x78], ecx
xor ecx, ecx
mov cl, byte [ebx]
add ebx, edi
mov dword [esp + 0x94], ecx
mov dword [esp + 0x18], ebx
xor ecx, ecx
xor ebx, ebx
mov cl, byte [eax]
mov bl, byte [edx]
imul ebx, ecx
add ebp, ebx
mov ebx, dword [esp + 0x78]
add esi, ecx
inc eax
lea ecx, [ebx*8]
add edx, edi
sub ecx, esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x94]
imul ecx, ebx
mov dword [esp + 0x58], ecx
lea ebx, [ecx*8]
sub ebx, ebp
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x78]
add esi, ebx
add ebp, ecx
mov dword [esp + 0x68], esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], esi
jmp 0x511574
mov esi, dword [esp + 0x78]
xor ebx, ebx
mov bl, byte [esi]
mov ebp, ebx
xor ebx, ebx
mov bl, byte [ecx]
add ecx, edi
mov esi, ebx
mov ebx, dword [esp + 0x78]
imul esi, ebp
inc ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x7c]
xor ecx, ecx
mov cl, byte [ebx]
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0x78], ecx
add ebp, ecx
xor ecx, ecx
mov cl, byte [ebx]
imul ecx, dword [esp + 0x78]
add esi, ecx
mov ecx, dword [esp + 0x7c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x6c]
add ecx, edi
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov cl, byte [eax]
mov dword [esp + 0x3c], ecx
add ebp, ecx
xor ecx, ecx
mov dword [esp + 0x2c], ebp
mov cl, byte [edx]
mov ebp, dword [esp + 0x14]
imul ecx, dword [esp + 0x3c]
add esi, ecx
xor ecx, ecx
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x10]
inc eax
add edx, edi
mov cl, byte [esi]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebp]
mov dword [esp + 0x68], esi
mov ebp, ecx
mov ecx, dword [esp + 0x14]
add ecx, edi
imul ebp, esi
mov esi, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
xor ecx, ecx
inc esi
mov cl, byte [ebx]
inc ebx
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x38], ebx
xor ebx, ebx
mov bl, byte [esi]
add esi, edi
mov dword [esp + 0x94], ebx
xor ebx, ebx
mov bl, byte [eax]
mov dword [esp + 0x18], esi
mov esi, ebx
mov ebx, dword [esp + 0x68]
add ebx, esi
mov dword [esp + 0x78], ecx
mov dword [esp + 0x68], ebx
xor ebx, ebx
mov bl, byte [edx]
imul ebx, esi
add ebp, ebx
inc eax
add edx, edi
lea esi, [ecx*8]
mov dword [esp + 0x24], edx
sub esi, dword [esp + 0x68]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x94]
imul esi, ecx
mov dword [esp + 0x58], esi
lea ebx, [esi*8]
sub ebx, ebp
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x68]
add ebx, ecx
add ebp, esi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x28], ebp
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
xor ecx, ecx
mov cl, byte [esi]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebx]
mov ebx, dword [esp + 0x10]
imul ecx, esi
inc ebx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x14]
add ebx, edi
mov dword [esp + 0x14], ebx
xor ebx, ebx
mov bl, byte [eax]
mov dword [esp + 0x3c], ebx
add esi, ebx
xor ebx, ebx
mov bl, byte [edx]
mov edx, dword [esp + 0x18]
imul ebx, dword [esp + 0x3c]
add ecx, ebx
mov ebx, dword [esp + 0x24]
inc eax
add ebx, edi
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x24], ebx
xor ebx, ebx
mov bl, byte [eax]
inc eax
mov dword [esp + 0x38], eax
xor eax, eax
mov al, byte [edx]
add edx, edi
mov dword [esp + 0x34], eax
imul eax, ebx
mov dword [esp + 0x18], edx
lea edx, [ebx*8]
sub edx, esi
add esi, ebx
mov dword [esp + 0x50], edx
lea edx, [eax*8]
sub edx, ecx
add ecx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x2c]
sub eax, esi
sub eax, edx
mov edx, dword [esp + 0x78]
add eax, edx
test eax, eax
mov dword [esp + 0x5c], eax
jle 0x511818
mov eax, dword [esp + 0x58]
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x40]
sub eax, ecx
sub eax, ebp
add eax, edx
cdq
idiv dword [esp + 0x5c]
mov edx, dword [esp + 0x94]
sub eax, edx
lea ebp, [eax + edx]
cmp ebp, 0xff
jle 0x511652
mov eax, 0xff
sub eax, edx
jmp 0x51165a
test ebp, ebp
jge 0x51165a
mov eax, edx
neg eax
imul eax, dword [esp + 0xac]
cdq
and edx, 0xff
mov ebp, dword [esp + 0x74]
add eax, edx
mov dl, byte [esp + 0x94]
sar eax, 8
add al, dl
mov edx, dword [esp + 0x64]
test ebp, ebp
mov byte [edx], al
mov eax, dword [esp + 0x44]
mov dword [esp + 0x20], eax
je 0x5116dd
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x5c]
sub eax, edx
add edx, eax
cmp edx, 0xff
jle 0x5116ae
mov edx, dword [esp + 0x78]
mov eax, 0xff
sub eax, edx
jmp 0x5116b8
test edx, edx
jge 0x5116b8
mov eax, dword [esp + 0x78]
neg eax
imul eax, dword [esp + 0xac]
cdq
and edx, 0xff
add eax, edx
mov dl, byte [esp + 0x78]
sar eax, 8
add al, dl
mov edx, dword [esp + 0x48]
mov byte [ebp], al
mov dword [esp + 0x1c], edx
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x98]
test eax, eax
jne 0x5116f8
mov edx, dword [esp + 0x68]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x68], esi
cmp eax, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x94], edx
mov dword [esp + 0x78], ebx
jle 0x511930
dec eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
xor ecx, ecx
xor ebx, ebx
mov cl, byte [eax]
mov esi, ecx
xor ecx, ecx
mov cl, byte [edx]
add edx, edi
imul ecx, esi
inc eax
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov bl, byte [eax]
inc eax
mov dword [esp + 0x38], eax
xor eax, eax
mov al, byte [edx]
add edx, edi
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x34], eax
xor eax, eax
mov al, byte [edx]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x3c], eax
add esi, eax
xor eax, eax
mov al, byte [edx]
mov edx, dword [esp + 0x4c]
imul eax, dword [esp + 0x3c]
add ecx, eax
mov eax, dword [esp + 0x24]
add eax, edi
inc edx
mov dword [esp + 0x24], eax
lea eax, [ebx*8]
sub eax, esi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x34]
imul eax, ebx
add esi, ebx
lea edx, [eax*8]
sub ebp, esi
sub edx, ecx
add ecx, eax
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x2c]
sub ebp, edx
mov edx, dword [esp + 0x78]
add ebp, edx
test ebp, ebp
jle 0x5118cd
mov eax, dword [esp + 0x94]
imul eax, edx
mov edx, dword [esp + 0x30]
sub eax, ecx
sub eax, edx
mov edx, dword [esp + 0x40]
add eax, edx
cdq
idiv ebp
mov edx, dword [esp + 0x94]
sub eax, edx
add edx, eax
cmp edx, 0xff
jle 0x511843
mov edx, dword [esp + 0x94]
mov eax, 0xff
sub eax, edx
jmp 0x511850
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x20], edx
mov byte [eax], 0
mov eax, dword [esp + 0x74]
test eax, eax
je 0x5116e1
mov byte [eax], 0
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
jmp 0x5116e1
test edx, edx
jge 0x511850
mov eax, dword [esp + 0x94]
neg eax
imul eax, dword [esp + 0xac]
cdq
and edx, 0xff
add edx, eax
mov al, byte [esp + 0x94]
sar edx, 8
add dl, al
mov eax, dword [esp + 0x20]
mov byte [eax], dl
add eax, edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
test eax, eax
je 0x5118ee
mov eax, dword [esp + 0x78]
sub ebp, eax
lea edx, [eax + ebp]
cmp edx, 0xff
jle 0x51189b
mov ebp, 0xff
sub ebp, eax
jmp 0x5118a3
test edx, edx
jge 0x5118a3
mov ebp, eax
neg ebp
mov eax, ebp
mov ebp, dword [esp + 0x1c]
imul eax, dword [esp + 0xac]
cdq
and edx, 0xff
add eax, edx
mov dl, byte [esp + 0x78]
sar eax, 8
add al, dl
mov byte [ebp], al
inc ebp
mov dword [esp + 0x1c], ebp
jmp 0x5118ee
mov eax, dword [esp + 0x20]
mov byte [eax], 0
add eax, edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
test eax, eax
je 0x5118ee
mov eax, dword [esp + 0x1c]
mov byte [eax], 0
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x68]
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x34]
dec eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x68], esi
mov dword [esp + 0x94], edx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x5c], eax
jne 0x511730
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x511a02
sub ebp, esi
mov esi, dword [esp + 0x2c]
sub ebp, esi
add ebp, ebx
mov esi, ebp
test esi, esi
jle 0x5119ec
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x3c]
imul eax, ebx
sub eax, ecx
mov ecx, dword [esp + 0x30]
sub eax, ecx
mov ecx, dword [esp + 0x34]
add eax, ebp
cdq
idiv esi
sub eax, ecx
lea edx, [eax + ecx]
cmp edx, 0xff
jle 0x511985
mov eax, 0xff
sub eax, ecx
jmp 0x51198d
test edx, edx
jge 0x51198d
mov eax, ecx
neg eax
mov ebp, dword [esp + 0xac]
imul eax, ebp
cdq
and edx, 0xff
add eax, edx
sar eax, 8
add al, cl
mov ecx, dword [esp + 0x20]
mov byte [ecx], al
mov eax, dword [esp + 0x74]
test eax, eax
je 0x511a02
sub esi, ebx
mov eax, esi
lea ecx, [eax + ebx]
cmp ecx, 0xff
jle 0x5119cb
mov eax, 0xff
sub eax, ebx
jmp 0x5119d3
test ecx, ecx
jge 0x5119d3
mov eax, ebx
neg eax
imul eax, ebp
cdq
and edx, 0xff
add eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 8
add al, bl
mov byte [edx], al
jmp 0x511a02
mov eax, dword [esp + 0x20]
mov byte [eax], 0
mov eax, dword [esp + 0x74]
test eax, eax
je 0x511a02
mov ecx, dword [esp + 0x1c]
mov byte [ecx], 0
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x84]
mov ebx, dword [esp + 0x64]
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x6c], eax
add eax, ebp
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x88]
mov ebp, dword [esp + 0x74]
add ebx, eax
add esi, eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x7c], eax
add eax, edx
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x44], esi
add ebp, eax
add ebx, eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x74], ebp
inc eax
mov dword [esp + 0x48], ebx
cmp eax, edx
mov dword [esp + 0x54], eax
jle 0x51136c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret