Function at 0x507530
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esi + 0x6c]
cmp eax, 0x106
jae 0x50735b
push esi
call fcn.005071f0
mov eax, dword [esi + 0x6c]
add esp, 4
cmp eax, 0x106
jae 0x507353
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x507646
test eax, eax
je 0x5075da
cmp eax, 3
jb 0x5073a1
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x64]
mov edi, dword [esi + 0x30]
shl eax, cl
xor ecx, ecx
mov cl, byte [edi + edx + 2]
mov edi, dword [esi + 0x4c]
xor eax, ecx
mov ecx, dword [esi + 0x3c]
and eax, edi
xor edi, edi
mov dword [esi + 0x40], eax
mov di, word [ecx + eax*2]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x38]
and eax, edx
mov word [ecx + eax*2], di
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x3c]
mov cx, word [esi + 0x64]
mov word [eax + edx*2], cx
test edi, edi
je 0x5073cc
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x24]
sub edx, edi
sub eax, 0x106
cmp edx, eax
ja 0x5073cc
cmp dword [esi + 0x80], 2
je 0x5073cc
push edi
push esi
call fcn.004f6830
add esp, 8
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x58]
cmp eax, 3
jb 0x507524
mov edx, dword [esi + 0x1698]
mov ebp, dword [esi + 0x169c]
mov cl, al
mov ax, word [esi + 0x64]
sub ax, word [esi + 0x68]
sub cl, 3
add ecx, dword [eax + 0x6614244c]
mov dword [ebp + edx*2], eax
mov edx, dword [esi + 0x1690]
mov ebp, dword [esi + 0x1698]
add eax, 0xffff
mov byte [edx + ebp], cl
mov edx, dword [esi + 0x1698]
mov ecx, dword [esp + 0x14]
inc edx
mov dword [esi + 0x1698], edx
and ecx, 0xff
xor edx, edx
mov dl, byte [ecx + 0x9c8f80]
inc word [esi + edx*4 + 0x490]
cmp ax, 0x100
lea ecx, [esi + edx*4 + 0x490]
jae 0x507453
and eax, 0xffff
xor ecx, ecx
mov cl, byte [eax + 0x9c8d80]
mov eax, ecx
jmp 0x507465
and eax, 0xffff
shr eax, 7
xor edx, edx
mov dl, byte [eax + 0x9c8e80]
mov eax, edx
inc word [esi + eax*4 + 0x980]
mov eax, dword [esi + 0x1694]
mov edx, dword [esi + 0x1698]
dec eax
xor ecx, ecx
cmp edx, eax
mov eax, dword [esi + 0x58]
mov edx, dword [esi + 0x78]
sete cl
mov ebp, ecx
mov ecx, dword [esi + 0x6c]
sub ecx, eax
cmp eax, edx
mov dword [esi + 0x6c], ecx
ja 0x5074f3
cmp ecx, 3
jb 0x5074f3
dec eax
mov dword [esi + 0x58], eax
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x30]
mov edi, dword [esi + 0x40]
inc edx
xor ecx, ecx
mov dword [esi + 0x64], edx
mov cl, byte [edx + eax + 2]
mov eax, ecx
mov ecx, dword [esi + 0x50]
shl edi, cl
mov ecx, dword [esi + 0x3c]
xor eax, edi
mov edi, dword [esi + 0x4c]
and eax, edi
xor edi, edi
mov dword [esi + 0x40], eax
mov di, word [ecx + eax*2]
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x38]
and edx, ecx
mov word [eax + edx*2], di
mov ecx, dword [esi + 0x40]
mov edx, dword [esi + 0x3c]
mov ax, word [esi + 0x64]
mov word [edx + ecx*2], ax
mov eax, dword [esi + 0x58]
dec eax
mov dword [esi + 0x58], eax
jne 0x50749e
jmp 0x50758f
mov ecx, dword [esi + 0x64]
mov edx, dword [esi + 0x30]
add ecx, eax
xor eax, eax
add edx, ecx
mov dword [esi + 0x64], ecx
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x58], 0
mov al, byte [edx]
mov dword [esi + 0x40], eax
shl eax, cl
xor ecx, ecx
mov cl, byte [edx + 1]
xor eax, ecx
mov ecx, dword [esi + 0x4c]
and eax, ecx
mov dword [esi + 0x40], eax
jmp 0x507592
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x1698]
mov al, byte [edx + eax]
mov edx, dword [esi + 0x169c]
mov byte [esp + 0xc], al
mov word [edx + ecx*2], 0
mov ecx, dword [esi + 0x1690]
mov edx, dword [esi + 0x1698]
mov byte [ecx + edx], al
mov eax, dword [esp + 0xc]
mov ebp, dword [esi + 0x1698]
and eax, 0xff
inc ebp
xor edx, edx
lea eax, [esi + eax*4 + 0x8c]
mov dword [esi + 0x1698], ebp
inc word [eax]
mov ecx, dword [esi + 0x1694]
mov ebp, dword [esi + 0x1698]
dec ecx
cmp ebp, ecx
mov ecx, dword [esi + 0x6c]
sete dl
dec ecx
mov ebp, edx
mov dword [esi + 0x6c], ecx
inc dword [esi + 0x64]
test ebp, ebp
je 0x50732a
mov ecx, dword [esi + 0x54]
test ecx, ecx
jl 0x5075aa
mov edx, dword [esi + 0x30]
mov eax, ecx
add eax, edx
jmp 0x5075ac
xor eax, eax
mov edx, dword [esi + 0x64]
push 0
sub edx, ecx
push edx
push eax
push esi
call fcn.00507cc0
mov ecx, dword [esi]
mov eax, dword [esi + 0x64]
push ecx
mov dword [esi + 0x54], eax
call fcn.004f60c0
mov edx, dword [esi]
add esp, 0x14
mov eax, dword [edx + 0x10]
test eax, eax
je 0x507646
jmp 0x50732a
mov ecx, dword [esi + 0x54]
test ecx, ecx
jl 0x5075e8
mov eax, dword [esi + 0x30]
add eax, ecx
jmp 0x5075ea
xor eax, eax
mov ebp, dword [esp + 0x18]
xor edx, edx
cmp ebp, 4
sete dl
push edx
mov edx, dword [esi + 0x64]
sub edx, ecx
push edx
push eax
push esi
call fcn.00507cc0
mov ecx, dword [esi]
mov eax, dword [esi + 0x64]
push ecx
mov dword [esi + 0x54], eax
call fcn.004f60c0
mov edx, dword [esi]
add esp, 0x14
mov eax, dword [edx + 0x10]
test eax, eax
jne 0x507631
mov esi, ebp
xor eax, eax
cmp esi, 4
pop edi
setne al
dec eax
pop esi
and eax, 2
pop ebp
pop ecx
ret
mov eax, dword [esp + 0x18]
pop edi
sub eax, 4
pop esi
neg eax
sbb eax, eax
pop ebp
and al, 0xfe
add eax, 3
pop ecx
ret
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret