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

Disassembly:
sub esp, 0x74
mov eax, dword [0x64c874]
xor eax, esp
mov dword [esp + 0x6c], eax
or eax, 0xffffffff
push ebx
push ebp
mov ebp, dword [esp + 0x80]
test byte [ebp + 0x28], 1
mov dword [esp + 8], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x2e8]
mov edx, dword [eax + 0x11a0]
push esi
push edi
mov edi, dword [eax + 0x11a4]
mov dword [esp + 0x68], edi
mov edi, dword [eax + 0x11a8]
mov esi, ecx
mov ecx, dword [eax + 0xc4]
mov dword [esp + 0x6c], edi
mov edi, dword [eax + 0x11ac]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 0x119c]
mov dword [esp + 0x70], edi
mov edi, dword [eax + 0x11b0]
mov eax, dword [eax + 0x11b4]
mov dword [esp + 0x24], esi
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], eax
jne 0x5079c0
xor eax, eax
xor edi, edi
xor ebx, ebx
cmp ecx, edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
jne 0x507a3e
cmp ecx, 1
jne 0x5079b7
lea edi, [esp + 0x44]
lea ebx, [esp + 0x68]
call fcn.004a8dc0
jmp 0x5079bc
cmp edx, ebx
sete al
test al, al
je 0x507a3e
mov edx, dword [0x64ebc8]
mov ebx, dword [0x6542a8]
mov ecx, dword [0x6542b0]
lea edi, [esp + 0x14]
mov eax, edx
shl eax, 0xb
xor eax, edx
mov esi, ecx
shr esi, 0xb
xor esi, eax
shr esi, 8
xor esi, eax
mov edx, ebx
mov ebx, dword [0x6542ac]
mov dword [0x6542ac], ecx
xor ecx, esi
mov byte [edi], cl
add edi, 1
lea eax, [esp + 0x18]
cmp edi, eax
jne 0x5079d6
mov esi, dword [esp + 0x24]
xor eax, eax
mov dword [0x6542b0], ecx
mov ecx, dword [esp + 0x14]
mov dword [0x6542a8], ebx
mov dword [0x64ebc8], edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov ecx, dword [ebp + 0x10]
cmp dword [ebp + 0x1c], ecx
jl 0x507a4d
mov dword [ebp + 0x1c], 0
mov eax, dword [ebp + 0x14]
test byte [eax + 0x52c], 0x10
je 0x507a71
mov edx, dword [eax + 0x2e8]
cmp byte [edx + 0xbb9], 0
jne 0x507a71
test byte [eax + 0x545], 1
je 0x507a7f
mov eax, dword [eax + 0x2e8]
mov edx, dword [eax + 0x1b0]
jmp 0x507a87
mov eax, edx
mov edx, dword [eax + 0x1ac]
mov eax, ecx
mov dword [esp + 0x20], eax
cmp eax, 0x12c
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], 0x12c
lea eax, [esp + 0x1c]
jg 0x507aa8
lea eax, [esp + 0x20]
mov eax, dword [eax]
test eax, eax
mov dword [esp + 0x1c], eax
jle 0x507d02
fild dword [esp + 0x14]
fmul qword [str.ffffff]
fstp qword [esp + 0x58]
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 0x1c], eax
jl 0x507ad3
mov dword [ebp + 0x1c], 0
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x1c]
add eax, esi
cmp esi, eax
jbe 0x507ae4
call fcn.005b8b18
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
add esi, edi
add ecx, eax
cmp esi, ecx
ja 0x507af6
cmp esi, eax
jae 0x507afb
call fcn.005b8b18
mov edx, dword [ebp + 0xc]
add edx, dword [ebp + 0x10]
mov edi, esi
mov ebx, esi
shr edi, 2
and ebx, 3
cmp esi, edx
jb 0x507b14
call fcn.005b8b18
mov eax, dword [ebp + 8]
cmp eax, edi
ja 0x507b1d
sub edi, eax
fild dword [ebp + 0x10]
mov eax, dword [ebp + 4]
mov ecx, dword [eax + edi*4]
mov edi, dword [ecx + ebx*4]
fcomp qword [esp + 0x58]
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x2c], ebx
fnstsw ax
test ah, 1
jne 0x507c28
cmp dword [esp + 0x14], 0
jle 0x507c28
mov dl, byte [ebp + 0x28]
and dl, 1
cmp edi, dword [ebp + 0x18]
mov byte [esp + 0x20], dl
je 0x507c28
cmp dword [edi + 8], 0
jne 0x507c28
mov eax, dword [esp + 0x20]
push eax
push ebp
mov esi, edi
call fcn.00507860
test al, al
jne 0x507c28
test byte [edi + 0x18], 0x1f
ja 0x507b97
mov ecx, dword [edi + 0x20]
and ecx, 0x3f00
cmp ecx, 0x1000
jne 0x507c28
mov ecx, dword [esp + 0x18]
cmp ecx, 0xffffffff
je 0x507bb7
push ecx
mov esi, ebp
call fcn.00509980
mov eax, dword [eax]
call fcn.00509820
test al, al
jne 0x507c28
mov ecx, dword [esp + 0x18]
cmp edi, dword [ebp + 0x18]
je 0x507c24
mov edx, dword [edi + 0x20]
and edx, 0x3f00
cmp edx, 0x1000
sete al
test al, al
je 0x507c24
cmp ecx, ebx
jle 0x507bdd
sub ecx, 1
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x10], ebx
jle 0x507be8
sub dword [esp + 0x10], 1
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
add eax, esi
cmp esi, eax
mov dword [esp + 0x30], 0
jbe 0x507c01
call fcn.005b8b18
mov ecx, dword [esp + 0x2c]
sub esp, 0xc
mov ebx, esp
push ecx
lea eax, [esp + 0x40]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], esi
call fcn.0052c120
push ebp
call fcn.00507230
jmp 0x507c8f
mov dword [esp + 0x18], ebx
movzx edx, byte [ebp + 0x28]
add dword [ebp + 0x1c], 1
and edx, 0xffffff01
push edx
push ebp
mov esi, edi
call fcn.00507860
test al, al
je 0x507c8f
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x507c64
push eax
mov esi, ebp
call fcn.00509980
mov eax, dword [eax]
lea ecx, [esp + 0x60]
push ecx
call fcn.005098a0
test al, al
jne 0x507c8f
movzx eax, word [edi + 0xe]
test ax, ax
je 0x507c8b
mov edx, dword [edi + 0x18]
mov ecx, dword [esp + 0x8c]
and edx, 0x1f
add edx, 1
imul edx, dword [esp + 0x28]
movzx eax, ax
sub ecx, eax
cmp ecx, edx
jl 0x507c8f
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x1c]
sub eax, 1
test eax, eax
mov dword [esp + 0x1c], eax
jg 0x507ac4
mov ebx, dword [esp + 0x18]
cmp ebx, 0xffffffff
jle 0x507cf5
cmp dword [esp + 0x10], ebx
jle 0x507cb6
sub dword [esp + 0x10], 1
mov esi, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
add edx, esi
cmp esi, edx
jbe 0x507cc7
call fcn.005b8b18
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
sub esp, 0xc
add esi, ebx
add ecx, eax
cmp esi, ecx
mov edi, esp
ja 0x507cde
cmp esi, eax
jae 0x507ce3
call fcn.005b8b18
push ebp
mov dword [edi], 0
mov dword [edi + 4], ebp
mov dword [edi + 8], esi
call fcn.00507230
mov edi, dword [esp + 0x10]
cmp edi, 0xffffffff
jne 0x507d40
mov esi, dword [esp + 0x24]
mov edi, dword [ebp + 0xc]
add edi, dword [ebp + 0x10]
mov dword [esi], 0
mov eax, dword [ebp + 0xc]
cmp eax, edi
ja 0x507d1e
mov edx, dword [ebp + 0x10]
add edx, eax
cmp edi, edx
jbe 0x507d23
call fcn.005b8b18
mov dword [esi + 4], ebp
mov dword [esi + 8], edi
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.005b88a9
add esp, 0x74
ret 8
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
add eax, esi
cmp esi, eax
jbe 0x507d51
call fcn.005b8b18
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
add esi, edi
add ecx, eax
cmp esi, ecx
ja 0x507d63
cmp esi, eax
jae 0x507d68
call fcn.005b8b18
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x7c]
pop edi
mov dword [eax + 8], esi
pop esi
mov dword [eax + 4], ebp
pop ebp
pop ebx
xor ecx, esp
mov dword [eax], 0
call fcn.005b88a9
add esp, 0x74
ret 8