Function at 0x511aa0
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 0x51219d
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 0x511b08
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x511b08
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x7c]
jmp 0x511b13
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x80]
mov esi, dword [esp + 0x98]
test esi, esi
je 0x511bc6
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 + 0x10], ecx
mov dword [esp + 0x68], 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 + 0x14], ecx
xor ecx, ecx
mov cl, byte [ebx]
add ebx, edi
mov dword [esp + 0x78], 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 + 0x14]
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 + 0x78]
imul ecx, ebx
mov dword [esp + 0x58], ecx
lea ebx, [ecx*8]
sub ebx, ebp
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x14]
add esi, ebx
add ebp, ecx
mov dword [esp + 0x94], esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], esi
jmp 0x511ced
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 + 0x10], ecx
mov dword [esp + 0x68], 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 + 0x10]
imul ecx, dword [esp + 0x3c]
add esi, ecx
xor ecx, ecx
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x68]
inc eax
add edx, edi
mov cl, byte [esi]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebp]
mov dword [esp + 0x94], esi
mov ebp, ecx
mov ecx, dword [esp + 0x10]
add ecx, edi
imul ebp, esi
mov esi, dword [esp + 0x68]
mov dword [esp + 0x10], ecx
xor ecx, ecx
inc esi
mov cl, byte [ebx]
inc ebx
mov dword [esp + 0x68], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x38], ebx
xor ebx, ebx
mov bl, byte [esi]
add esi, edi
mov dword [esp + 0x78], ebx
xor ebx, ebx
mov bl, byte [eax]
mov dword [esp + 0x18], esi
mov esi, ebx
mov ebx, dword [esp + 0x94]
add ebx, esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x94], 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 + 0x94]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x78]
imul esi, ecx
mov dword [esp + 0x58], esi
lea ebx, [esi*8]
sub ebx, ebp
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x94]
add ebx, ecx
add ebp, esi
mov dword [esp + 0x94], ebx
mov dword [esp + 0x28], ebp
mov esi, dword [esp + 0x68]
mov ebx, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [esi]
mov esi, ecx
xor ecx, ecx
mov cl, byte [ebx]
mov ebx, dword [esp + 0x68]
imul ecx, esi
inc ebx
mov dword [esp + 0x68], ebx
mov ebx, dword [esp + 0x10]
add ebx, edi
mov dword [esp + 0x10], 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 + 0x14]
add eax, edx
test eax, eax
mov dword [esp + 0x5c], eax
jle 0x511f5f
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x40]
sub eax, ecx
sub eax, edx
add eax, ebp
cdq
idiv dword [esp + 0x5c]
mov ebp, eax
mov eax, dword [esp + 0x78]
sub ebp, eax
lea edx, [eax + ebp]
cmp edx, 0xff
jle 0x511dca
mov ebp, 0xff
sub ebp, eax
jmp 0x511dd2
test edx, edx
jge 0x511dd2
mov ebp, eax
neg ebp
mov edx, ebp
sar edx, 2
add dl, al
mov eax, dword [esp + 0x64]
mov byte [eax], dl
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x44]
test eax, eax
mov dword [esp + 0x20], edx
je 0x511e2a
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x5c]
sub ebp, eax
lea edx, [eax + ebp]
cmp edx, 0xff
jle 0x511e0d
mov ebp, 0xff
sub ebp, eax
jmp 0x511e15
test edx, edx
jge 0x511e15
mov ebp, eax
neg ebp
mov edx, ebp
sar edx, 2
add dl, al
mov eax, dword [esp + 0x74]
mov byte [eax], dl
mov edx, dword [esp + 0x48]
mov dword [esp + 0x1c], edx
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x98]
test eax, eax
jne 0x511e48
mov edx, dword [esp + 0x94]
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 + 0x94], esi
cmp eax, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x14], ebx
jle 0x512050
dec eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x10]
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 + 0x10], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x68], 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 + 0x14]
add ebp, edx
test ebp, ebp
jle 0x511fea
mov eax, dword [esp + 0x78]
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 + 0x78]
sub eax, edx
add edx, eax
cmp edx, 0xff
jle 0x511f8a
mov edx, dword [esp + 0x78]
mov eax, 0xff
sub eax, edx
jmp 0x511f94
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 0x511e2e
mov byte [eax], 0
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
jmp 0x511e2e
test edx, edx
jge 0x511f94
mov eax, dword [esp + 0x78]
neg eax
mov edx, eax
mov al, byte [esp + 0x78]
sar edx, 2
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 0x51200b
mov eax, dword [esp + 0x14]
sub ebp, eax
lea edx, [eax + ebp]
cmp edx, 0xff
jle 0x511fcd
mov ebp, 0xff
sub ebp, eax
jmp 0x511fd5
test edx, edx
jge 0x511fd5
mov ebp, eax
neg ebp
mov edx, ebp
mov ebp, dword [esp + 0x1c]
sar edx, 2
add dl, al
mov byte [ebp], dl
inc ebp
mov dword [esp + 0x1c], ebp
jmp 0x51200b
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 0x51200b
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 + 0x94]
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 + 0x94], esi
mov dword [esp + 0x78], edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x5c], eax
jne 0x511e80
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x51210f
sub ebp, esi
mov esi, dword [esp + 0x2c]
sub ebp, esi
add ebp, ebx
mov esi, ebp
test esi, esi
jle 0x5120f9
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 0x5120a5
mov eax, 0xff
sub eax, ecx
jmp 0x5120ad
test edx, edx
jge 0x5120ad
mov eax, ecx
neg eax
sar eax, 2
add al, cl
mov ecx, dword [esp + 0x20]
mov byte [ecx], al
mov eax, dword [esp + 0x74]
test eax, eax
je 0x51210f
sub esi, ebx
lea eax, [esi + ebx]
cmp eax, 0xff
jle 0x5120e2
mov eax, dword [esp + 0x1c]
mov esi, 0xff
sub esi, ebx
mov edx, esi
sar edx, 2
add dl, bl
mov byte [eax], dl
jmp 0x51210f
test eax, eax
jge 0x5120ea
mov esi, ebx
neg esi
mov eax, dword [esp + 0x1c]
mov edx, esi
sar edx, 2
add dl, bl
mov byte [eax], dl
jmp 0x51210f
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x74]
test eax, eax
mov byte [ecx], 0
je 0x51210f
mov edx, dword [esp + 0x1c]
mov byte [edx], 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 dword [esp + 0x6c], eax
add eax, ebp
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x88]
add ebx, eax
add esi, eax
mov eax, dword [esp + 0x7c]
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x80]
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 0x511adc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret