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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1edc
lea eax, [esp + 0x1c]
push ebx
push esi
push edi
push 0x100
push 0
push eax
call fcn.004016a0
add esp, 0xc
xor edi, edi
xor eax, eax
jmp 0x403a20
mov byte [esp + eax + 0x28], al
inc eax
cmp eax, 0x100
jb 0x403a20
xor esi, esi
mov edi, edi
mov dl, byte [esp + esi + 0x28]
mov eax, esi
and eax, 3
movzx ecx, dl
movzx eax, byte [eax + 0x41a1e8]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [esp + edi + 0x28]
mov byte [esp + esi + 0x28], al
inc esi
mov byte [esp + edi + 0x28], dl
cmp esi, 0x100
jb 0x403a30
mov cl, byte [esp + 0x29]
movzx esi, cl
push 0x100
movzx eax, byte [esp + esi + 0x2c]
mov byte [esp + 0x2d], al
mov byte [esp + esi + 0x2c], cl
movzx eax, byte [esp + 0x2d]
mov cl, byte [esp + 0x2e]
add eax, esi
movzx eax, al
movzx edx, cl
mov al, byte [esp + eax + 0x2c]
xor al, 0xe0
mov byte [esp + 0x16], al
lea eax, [edx + esi]
movzx esi, al
movzx eax, byte [esp + esi + 0x2c]
mov byte [esp + 0x2e], al
mov byte [esp + esi + 0x2c], cl
movzx eax, byte [esp + 0x2e]
mov cl, byte [esp + 0x2f]
add eax, edx
movzx eax, al
mov al, byte [esp + eax + 0x2c]
xor al, 0xa0
mov byte [esp + 0x17], al
movzx eax, cl
add eax, esi
movzx eax, al
mov byte [esp + eax + 0x2c], cl
xor eax, eax
push eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
call fcn.004016a0
add esp, 0xc
xor edi, edi
xor eax, eax
mov byte [esp + eax + 0x28], al
inc eax
cmp eax, 0x100
jb 0x403af2
xor esi, esi
mov dl, byte [esp + esi + 0x28]
mov eax, esi
and eax, 3
movzx ecx, dl
movzx eax, byte [eax + 0x41a1d0]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [esp + edi + 0x28]
mov byte [esp + esi + 0x28], al
inc esi
mov byte [esp + edi + 0x28], dl
cmp esi, 0x100
jb 0x403b00
xor edi, edi
xor ebx, ebx
xor esi, esi
lea eax, [edi + 1]
movzx edi, al
mov cl, byte [esp + edi + 0x28]
movzx edx, cl
lea eax, [edx + ebx]
movzx ebx, al
movzx eax, byte [esp + ebx + 0x28]
mov byte [esp + edi + 0x28], al
mov byte [esp + ebx + 0x28], cl
movzx eax, byte [esp + edi + 0x28]
add eax, edx
movzx eax, al
movzx eax, byte [esp + eax + 0x28]
xor al, byte [esi + 0x41a1d4]
mov byte [esp + esi + 0x14], al
inc esi
cmp esi, 0x14
jb 0x403b35
push 0x1ebc
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.004016a0
add esp, 0xc
cmp dword [0x80bd50], 0
jne 0x403d86
xor edx, edx
lea ecx, [esp + 0x14]
call fcn.00402240
mov edi, eax
mov dword [esp + 0x1de8], edi
test edi, edi
je 0x403d86
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x1dec], ecx
test ecx, ecx
je 0x403d86
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [esp + 0x1e00], eax
je 0x403d86
add eax, 0x78
mov dword [esp + 0x1e80], eax
je 0x403d86
mov edx, dword [eax]
mov dword [esp + 0x1e84], edx
test edx, edx
je 0x403d86
cmp dword [eax + 4], 0
je 0x403d86
add edx, ecx
mov dword [esp + 0x1d9c], edx
je 0x403d86
mov eax, dword [edx + 0x1c]
mov ebx, dword [edx + 0x20]
add eax, ecx
mov esi, dword [edx + 0x18]
add ebx, ecx
mov dword [esp + 0x1e8c], eax
mov eax, dword [edx + 0x24]
mov edx, dword [esp + 0x1ee0]
add eax, ecx
mov dword [esp + 0x1e88], esi
mov dword [esp + 0x1ed8], ebx
mov dword [esp + 0x1edc], eax
jmp 0x403c50
mov ecx, dword [ebx + esi*4 - 4]
add ecx, dword [edi + 0x18]
je 0x403ceb
mov al, byte [esp + 0x12]
cmp byte [ecx], al
jne 0x403ceb
mov al, byte [esp + 0x13]
cmp byte [ecx + 1], al
jne 0x403ceb
add ecx, 2
mov esi, 0x75651276
cmp byte [ecx], 0
je 0x403c93
nop
movzx eax, word [ecx]
lea ecx, [ecx + 1]
imul esi, esi, 0x1003f
add esi, eax
cmp byte [ecx], 0
jne 0x403c80
mov dword [esp + edx*8 + 0x2c], esi
mov eax, dword [esp + 0x1e88]
mov ecx, dword [esp + 0x1edc]
movzx ecx, word [ecx + eax*2 - 2]
mov eax, dword [esp + 0x1e8c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esp + 0x1ee0]
mov dword [esp + eax*8 + 0x30], ecx
mov edx, dword [esp + 0x1ee0]
inc edx
mov dword [esp + 0x1ee0], edx
cmp edx, 0x3ae
je 0x403cfb
mov ebx, dword [esp + 0x1ed8]
mov esi, dword [esp + 0x1e88]
mov edi, dword [esp + 0x1de8]
sub esi, 1
mov dword [esp + 0x1e88], esi
jne 0x403c50
lea eax, [edx - 1]
mov dword [esp + 0x28], edx
xor ebx, ebx
test eax, eax
je 0x403d4d
mov ecx, edx
xor eax, eax
sub ecx, ebx
sub ecx, 1
je 0x403d45
mov esi, dword [esp + eax*8 + 0x38]
mov edi, dword [esp + eax*8 + 0x30]
cmp edi, esi
jbe 0x403d3b
mov edx, dword [esp + eax*8 + 0x2c]
mov ecx, dword [esp + eax*8 + 0x34]
mov dword [esp + eax*8 + 0x2c], ecx
mov dword [esp + eax*8 + 0x30], esi
mov dword [esp + eax*8 + 0x34], edx
mov dword [esp + eax*8 + 0x38], edi
mov edx, dword [esp + 0x28]
mov ecx, edx
inc eax
sub ecx, ebx
dec ecx
cmp eax, ecx
jb 0x403d13
inc ebx
lea eax, [edx - 1]
cmp ebx, eax
jb 0x403d08
xor ecx, ecx
mov dword [0x80bd50], edx
test edx, edx
je 0x403d86
lea esp, [esp]
mov eax, dword [esp + ecx*8 + 0x2c]
mov dword [ecx*4 + 0x80bd54], eax
inc ecx
cmp ecx, edx
jb 0x403d60
mov edx, dword [0x80bd50]
test edx, edx
je 0x403d86
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret