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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov esi, esp
mov dword [esi + 0x58], ebp
mov edx, dword [ebp + 8]
mov dword [esi + 0x5c], esp
mov dword [esi + 0x68], 0xffffffff
lea eax, [esi + 0x60]
mov dword [esi + 0x64], 0x401d70
mov ecx, dword fs:[0]
mov dword [esi + 0x60], ecx
mov dword fs:[0], eax
mov eax, dword [edx + 0x3c]
mov ecx, dword [eax + edx + 0x78]
mov edi, edx
mov edx, dword [ecx + edx + 0x18]
mov dword [esi + 0x44], edx
test edx, edx
je 0x401661
mov dword [esi + 0x3c], ecx
mov ecx, dword [edi + ecx + 0x20]
add ecx, edi
mov dword [esi + 0x1c], ecx
test edi, edi
setne al
cmp dword [ebp + 0xc], 4
setae cl
and cl, al
mov byte [esi + 0xb], cl
mov edi, dword [ebp + 8]
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], 0
jmp 0x40143e
add edi, 0x24
mov ecx, edi
mov eax, edx
push ecx
push eax
call fcn.0040ac00
add esp, 8
mov ecx, dword [esi + 0x14]
inc ecx
mov eax, ecx
mov dword [esi + 0x14], ecx
cmp ecx, dword [esi + 0x44]
sete al
or bl, al
cmp bl, 1
mov edi, dword [ebp + 8]
je 0x401668
mov ecx, dword [esi + 0x1c]
mov ebx, dword [ecx]
add ebx, edi
xorps xmm0, xmm0
movaps xmmword [esi + 0x20], xmm0
mov dword [esi + 0x34], 0
mov dword [esi + 0x30], 0
push ebx
call fcn.00414130
add esp, 4
test eax, eax
js 0x40167f
mov edi, eax
cmp eax, 0xf
ja 0x4014a0
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], 0xf
push edi
push ebx
lea eax, [esi + 0x20]
push eax
call fcn.00410a10
add esp, 0xc
cmp byte [esi + 0xb], 0
jne 0x401515
mov edi, dword [esi + 0x34]
jmp 0x401623
mov ecx, edi
or ecx, 0xf
cmp ecx, 0x17
mov eax, 0x16
cmovb ecx, eax
mov dword [esi + 0x68], 0xffffffff
cmp ecx, 0xfff
mov dword [esi + 0x18], ecx
jb 0x4014e0
lea eax, [ecx + 0x24]
push eax
call fcn.0040ac0e
add esp, 4
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x4014ee
lea eax, [ecx + 1]
push eax
call fcn.0040ac0e
add esp, 4
mov ecx, eax
mov dword [esi + 0x20], ecx
mov dword [esi + 0x30], edi
mov eax, dword [esi + 0x18]
mov dword [esi + 0x34], eax
push edi
push ebx
push ecx
mov ebx, ecx
call fcn.00410a10
add esp, 0xc
mov byte [ebx + edi], 0
cmp byte [esi + 0xb], 0
je 0x401494
mov ecx, dword [esi + 0x34]
lea edx, [esi + 0x20]
cmp ecx, 0x10
jb 0x401523
mov edx, dword [esi + 0x20]
mov dword [esi + 0x10], ecx
mov eax, dword [esi + 0x30]
mov ebx, eax
xor ebx, 0x14d
cmp eax, 4
mov dword [esi + 0x40], eax
jb 0x40158f
shr eax, 2
mov dword [esi + 0x48], eax
mov dword [esi + 0x68], 0
xor eax, eax
mov dword [esi + 0x4c], edx
nop dword [eax + eax]
mov dword [esi + 0x18], ebx
mov dword [esi + 0x54], eax
mov eax, dword [edx + eax*4]
mov dword [esi + 0x50], eax
push 0
call dword [sym.imp.GDI32.dll_CancelDC]
imul eax, dword [esi + 0x50], 0x5bd1e991
mov ecx, eax
shr ecx, 0x18
xor ecx, eax
imul eax, ecx, 0x5bd1e991
mov ebx, dword [esi + 0x18]
imul ebx, ebx, 0x5bd1e991
xor ebx, eax
mov eax, dword [esi + 0x54]
inc eax
cmp dword [esi + 0x48], eax
mov edx, dword [esi + 0x4c]
jne 0x401550
mov edi, dword [esi + 0x40]
mov eax, edi
and eax, 0xfffffffc
and edi, 3
xor ecx, ecx
cmp edi, 1
je 0x4015c1
cmp edi, 2
je 0x4015b3
cmp edi, 3
jne 0x4015cf
movsx ecx, byte [edx + eax + 2]
shl ecx, 0x10
mov edi, edx
movsx edx, byte [edx + eax + 1]
shl edx, 8
xor ecx, edx
mov edx, edi
movsx eax, byte [edx + eax]
xor eax, ecx
imul eax, eax, 0x5bd1e991
xor ebx, eax
mov eax, ebx
shr eax, 0xd
xor eax, ebx
imul ecx, eax, 0x5bd1e991
mov eax, ecx
shr eax, 0xf
xor eax, ecx
je 0x401620
cmp eax, dword [ebp + 0xc]
jne 0x401620
mov edx, dword [ebp + 8]
mov edi, dword [esi + 0x3c]
mov eax, dword [edx + edi + 0x24]
mov ecx, dword [esi + 0x14]
lea ecx, [edx + ecx*2]
movzx eax, word [eax + ecx]
mov ecx, dword [edx + edi + 0x1c]
add ecx, edx
mov eax, dword [ecx + eax*4]
mov dword [esi + 0xc], eax
mov bl, 1
mov edi, dword [esi + 0x10]
cmp edi, 0x10
jb 0x401421
jmp 0x401632
mov edi, dword [esi + 0x10]
add dword [esi + 0x1c], 4
xor ebx, ebx
cmp edi, 0x10
jb 0x401421
mov eax, dword [esi + 0x20]
lea ecx, [edi + 1]
cmp ecx, 0x1000
jb 0x401417
mov edx, dword [eax - 4]
add eax, 0xfffffffc
sub eax, edx
cmp eax, 0x20
jb 0x401410
mov dword [esi + 0x68], 1
call fcn.004144d7
mov dword [esi + 0xc], 0
mov eax, dword [esi + 0xc]
add eax, edi
mov ecx, dword [esi + 0x60]
mov dword fs:[0], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esi + 0x68], 0xffffffff
call fcn.00403090
nop dword [eax + eax]
push ebp
sub esp, 0xc
lea esi, [ebp - 0x6c]
mov ebp, dword [esi + 0x58]
call fcn.00410a09
nop
push ebp
sub esp, 0xc
lea esi, [ebp - 0x6c]
mov ebp, dword [esi + 0x58]
lea ecx, [esi + 0x20]
call fcn.004022a0
add esp, 0xc
pop ebp
ret