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

Disassembly:
sub esp, 0x54
mov eax, dword [0x41800c]
xor eax, esp
mov dword [esp + 0x4c], eax
mov dword [esp + 0x28], edx
xor ecx, ecx
mov edx, dword [0x447200]
push ebx
push ebp
push esi
mov eax, dword [edx + 0x3c]
push edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], ecx
mov eax, dword [eax + edx + 0x78]
add eax, edx
mov dword [esp + 0x40], eax
mov esi, dword [eax + 0x20]
mov eax, dword [eax + 0x18]
add esi, edx
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], eax
test eax, eax
je 0x4015b6
mov ebp, dword [esi]
xorps xmm0, xmm0
add ebp, edx
mov ebx, 0x16
mov esi, ebp
movups xmmword [esp + 0x44], xmm0
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4013a1
sub esi, ecx
mov dword [esp + 0x28], esi
cmp esi, 0x7fffffff
ja 0x40161d
cmp esi, 0x10
jae 0x4013f4
push esi
lea eax, [esp + 0x48]
mov dword [esp + 0x58], esi
push ebp
push eax
mov dword [esp + 0x64], 0xf
call fcn.00403610
mov edi, dword [esp + 0x64]
mov esi, dword [esp + 0x60]
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x20], edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], ebx
jmp 0x40148a
mov edi, esi
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x401414
mov edi, 0x7fffffff
mov ecx, 0x80000000
mov dword [esp + 0x14], edi
add ecx, 0x23
jmp 0x401433
cmp edi, 0x16
cmovb edi, ebx
mov dword [esp + 0x14], edi
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x40144f
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401622
push ecx
call fcn.0040271b
add esp, 4
test eax, eax
je 0x401627
lea ebx, [eax + 0x23]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x40146e
test eax, eax
je 0x401468
push eax
call fcn.0040271b
add esp, 4
mov dword [esp + 0x1c], eax
mov ebx, eax
mov dword [esp + 0x14], edi
jmp 0x401472
xor ebx, ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ebx
push esi
push ebp
push ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edi
call fcn.00403610
mov byte [ebx + esi], 0
add esp, 0xc
cmp dword [esp + 0x18], 0
jbe 0x401566
mov edx, esi
lea eax, [esp + 0x44]
xor edx, 0x14d
cmp edi, 0x10
mov dword [esp + 0x20], edx
cmovae eax, ebx
xor ebp, ebp
mov dword [esp + 0x30], eax
mov eax, esi
shr eax, 2
mov dword [esp + 0x2c], eax
test eax, eax
je 0x401511
mov esi, dword [esp + 0x30]
mov ebx, edx
mov edi, eax
nop dword [eax]
push 0
call dword [sym.imp.ADVAPI32.dll_IsValidAcl]
imul ecx, dword [esi + ebp*4], 0x5bd1e991
inc ebp
imul ebx, ebx, 0x5bd1e991
mov eax, ecx
shr eax, 0x18
xor eax, ecx
imul ecx, eax, 0x5bd1e991
xor ebx, ecx
cmp ebp, edi
jl 0x4014d0
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
and esi, 3
lea ebp, [ecx + eax*4]
xor ecx, ecx
sub esi, 1
je 0x40153c
sub esi, 1
je 0x401533
sub esi, 1
jne 0x40154a
movsx ecx, byte [ebp + 2]
shl ecx, 0x10
movsx eax, byte [ebp + 1]
shl eax, 8
xor ecx, eax
movsx eax, byte [ebp]
xor eax, ecx
imul eax, eax, 0x5bd1e991
xor edx, eax
mov eax, edx
shr eax, 0xd
xor eax, edx
imul eax, eax, 0x5bd1e991
mov ecx, eax
shr ecx, 0xf
xor ecx, eax
je 0x401566
cmp ecx, dword [esp + 0x38]
je 0x4015ce
mov esi, dword [esp + 0x34]
add esi, 4
mov dword [esp + 0x34], esi
cmp edi, 0x10
jb 0x40159f
inc edi
mov eax, ebx
cmp edi, 0x1000
jb 0x401595
mov ebx, dword [eax - 4]
add edi, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401627
push edi
push ebx
call fcn.0040274b
add esp, 8
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x3c]
jb 0x40138b
xor esi, esi
mov ecx, dword [esp + 0x5c]
lea eax, [edx + esi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040270d
add esp, 0x54
ret
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x24]
lea eax, [eax + ecx*2]
movzx ecx, word [eax + edx]
mov eax, dword [esi + 0x1c]
lea eax, [eax + ecx*4]
mov esi, dword [eax + edx]
cmp edi, 0x10
jb 0x4015b8
inc edi
mov eax, ebx
cmp edi, 0x1000
jb 0x40160d
mov ebx, dword [eax - 4]
add edi, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401627
push edi
push ebx
call fcn.0040274b
mov edx, dword [esp + 0x20]
add esp, 8
jmp 0x4015b8
call fcn.00401150
call fcn.004010d0
call fcn.0040590c
int3