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

Disassembly:
sub esp, 0x60
mov eax, dword [esp + 0x74]
push ebx
push ebp
mov ebp, dword [esp + 0x80]
mov ebx, dword [eax]
push esi
mov esi, dword [esp + 0x70]
mov ebp, dword [ebp]
push edi
xor edi, edi
cmp byte [ebx], 1
mov esi, dword [esi]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
jne 0x511576
mov al, byte [ebx + 1]
inc ebx
test al, al
jns 0x511568
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00558770
mov edi, dword [esp + 0x1c]
add esp, 8
jmp 0x511574
movzx edi, al
mov eax, 1
mov dword [esp + 0x14], edi
add ebx, eax
cmp byte [ebp], 1
jne 0x5115a2
mov al, byte [ebp + 1]
inc ebp
test al, al
jns 0x511594
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.00558770
add esp, 8
jmp 0x5115a0
movzx eax, al
mov dword [esp + 0x18], eax
mov eax, 1
add ebp, eax
cmp edi, dword [esp + 0x18]
jne 0x5118b1
mov dword [esp + 0x28], esi
xorps xmm0, xmm0
movlpd qword [esp + 0x48], xmm0
test edi, edi
je 0x5115e8
mov eax, edi
mov byte [esi], 1
cdq
inc esi
mov ecx, eax
mov al, cl
mov edi, esi
or al, 0x80
shrd ecx, edx, 7
mov byte [esi], al
inc esi
mov byte [esp + 0x13], al
mov eax, ecx
shr edx, 7
or eax, edx
jne 0x5115c6
mov al, byte [esp + 0x13]
and al, 0x7f
mov byte [edi], al
lea eax, [esp + 0x50]
push eax
push ebx
call fcn.00558880
add ebx, eax
mov eax, dword [esp + 0x58]
sub eax, 2
mov dword [esp + 0x44], ebx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x5c]
sbb eax, 0
mov dword [esp + 0x24], eax
lea eax, [esp + 0x60]
push eax
push ebp
call fcn.00558880
mov ecx, dword [esp + 0x68]
add esp, 0x10
mov edi, dword [esp + 0x5c]
add ebp, eax
sub ecx, 2
mov dword [esp + 0x24], ecx
sbb edi, 0
cmp dword [esp + 0x1c], 0
jl 0x51196f
jg 0x511649
cmp dword [esp + 0x20], 0
jb 0x51196f
test edi, edi
jl 0x51196f
jg 0x51165b
test ecx, ecx
jb 0x51196f
mov eax, dword [esp + 0x78]
cdq
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], edx
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x20]
nop dword [eax]
mov eax, dword [esp + 0x40]
add eax, edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x44]
adc eax, dword [esp + 0x1c]
mov dword [esp + 0x48], eax
cmp ecx, dword [esp + 0x2c]
jne 0x5116a0
cmp edi, eax
je 0x5116d6
cmp dword [esp + 0x80], 0
jne 0x511756
cmp edi, dword [esp + 0x1c]
jl 0x511756
jg 0x5116c2
cmp ecx, edx
jbe 0x511756
cmp edi, eax
jg 0x511756
jl 0x5116d6
cmp ecx, dword [esp + 0x2c]
ja 0x511756
cmp dword [esp + 0x7c], 0
je 0x5116ed
mov ecx, dword [esp + 0x1c]
mov eax, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], ecx
jmp 0x5116f9
mov eax, ecx
mov dword [esp + 0x28], ecx
mov ecx, edi
mov dword [esp + 0x34], edi
mov edx, eax
mov eax, ecx
sub edx, dword [esp + 0x30]
sbb eax, dword [esp + 0x38]
add edx, 2
adc eax, 0
nop dword [eax + eax]
mov bl, dl
mov dword [esp + 0x38], esi
shrd edx, eax, 7
or bl, 0x80
mov byte [esi], bl
mov ecx, edx
shr eax, 7
inc esi
or ecx, eax
jne 0x511710
mov eax, dword [esp + 0x38]
and bl, 0x7f
mov edx, dword [esp + 0x20]
mov byte [eax], bl
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x7c], 0
jne 0x511769
cmp edi, eax
jl 0x511775
jg 0x511769
cmp ecx, dword [esp + 0x2c]
jbe 0x511775
cmp edi, dword [esp + 0x1c]
jg 0x5117a8
jl 0x511775
cmp ecx, edx
ja 0x5117a8
test byte [ebp], 0xfe
je 0x5117e6
lea eax, [esp + 0x60]
push eax
push ebp
call fcn.00558880
mov ecx, dword [esp + 0x68]
add ebp, eax
mov eax, dword [esp + 0x6c]
add esp, 8
sub ecx, 2
sbb eax, 0
add dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x24]
adc edi, eax
jmp 0x511678
test byte [ebx], 0xfe
je 0x5117e6
lea eax, [esp + 0x68]
push eax
push ebx
call fcn.00558880
mov ecx, dword [esp + 0x70]
add ebx, eax
mov eax, dword [esp + 0x74]
add esp, 8
mov edx, dword [esp + 0x20]
sub ecx, 2
mov dword [esp + 0x3c], ebx
sbb eax, 0
add edx, ecx
mov ecx, dword [esp + 0x24]
adc dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
jmp 0x511680
mov eax, dword [esp + 0x28]
mov edx, ebx
mov bl, byte [ebx]
test eax, eax
cmove eax, esi
mov dword [esp + 0x28], eax
test bl, 0xfe
je 0x511811
nop dword [eax]
mov cl, byte [edx + 1]
inc edx
mov al, bl
mov bl, cl
and al, 0x80
or cl, al
test cl, 0xfe
jne 0x511800
mov ah, byte [ebp]
mov ebx, edx
mov edi, ebp
test ah, 0xfe
je 0x511831
nop dword [eax]
mov cl, byte [edi + 1]
inc edi
mov al, ah
mov ah, cl
and al, 0x80
or cl, al
test cl, 0xfe
jne 0x511820
cmp byte [edx], 0
mov ebp, edi
mov eax, dword [esp + 0x28]
mov esi, eax
je 0x51196f
cmp byte [edi], 0
je 0x51196f
mov al, byte [edx + 1]
lea ebx, [edx + 1]
test al, al
jns 0x511865
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00558770
add esp, 8
jmp 0x511871
movzx eax, al
mov dword [esp + 0x14], eax
mov eax, 1
add ebx, eax
lea ebp, [edi + 1]
mov al, byte [ebp]
test al, al
jns 0x511898
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.00558770
mov esi, dword [esp + 0x30]
add esp, 8
mov edi, dword [esp + 0x14]
jmp 0x5115a0
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
movzx eax, al
mov dword [esp + 0x18], eax
mov eax, 1
jmp 0x5115a0
jge 0x511913
mov dl, byte [ebx]
mov edi, ebx
test dl, 0xfe
je 0x5118d3
mov bl, dl
nop
mov dl, byte [edi + 1]
inc edi
mov cl, bl
mov al, dl
and cl, 0x80
mov bl, dl
or al, cl
test al, 0xfe
jne 0x5118c0
mov ebx, edi
test dl, dl
je 0x51196f
mov al, byte [edi + 1]
lea ebx, [edi + 1]
test al, al
jns 0x511900
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00558770
mov edi, dword [esp + 0x1c]
add esp, 8
add ebx, eax
jmp 0x5115a2
movzx edi, al
mov eax, 1
mov dword [esp + 0x14], edi
add ebx, eax
jmp 0x5115a2
mov dl, byte [ebp]
mov edi, ebp
test dl, 0xfe
je 0x511933
mov ah, dl
nop
mov dl, byte [edi + 1]
inc edi
mov cl, ah
mov al, dl
and cl, 0x80
mov ah, dl
or al, cl
test al, 0xfe
jne 0x511920
mov ebp, edi
test dl, dl
je 0x51196f
mov al, byte [edi + 1]
lea ebp, [edi + 1]
test al, al
jns 0x51195a
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.00558770
mov edi, dword [esp + 0x1c]
add esp, 8
jmp 0x5115a0
mov edi, dword [esp + 0x14]
movzx eax, al
mov dword [esp + 0x18], eax
mov eax, 1
jmp 0x5115a0
mov dl, byte [ebp]
test dl, dl
je 0x511984
mov cl, byte [ebp + 1]
inc ebp
mov al, dl
mov dl, cl
and al, 0x80
or cl, al
jne 0x511976
mov dl, byte [ebx]
inc ebp
test dl, dl
je 0x51199e
nop dword [eax + eax]
mov cl, byte [ebx + 1]
inc ebx
mov al, dl
mov dl, cl
and al, 0x80
or cl, al
jne 0x511990
mov ecx, dword [esp + 0x84]
lea eax, [ebx + 1]
mov dword [ecx], eax
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x74]
mov dword [eax], ebp
cmp dword [ecx], esi
jne 0x5119c5
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
pop edi
lea eax, [esi + 1]
mov byte [esi], 0
pop esi
pop ebp
mov dword [ecx], eax
mov eax, 1
pop ebx
add esp, 0x60
ret