Function at 0x401e80
Capabilities:
Encode data using xor
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x444
mov eax, dword [0x416008]
xor eax, esp
mov dword [esp + 0x440], eax
push ebx
push esi
push edi
mov edi, ecx
test edi, edi
je 0x401f76
cmp dword [edi + 0xc], 0
je 0x401f76
test edx, edx
je 0x401f76
mov dword [edi + 0x18], 0
mov esi, 0x5a4d
movzx eax, word [edx]
xor ecx, ecx
cmp si, ax
sete cl
jne 0x401efe
mov esi, dword [edx + 0x3c]
xor ecx, ecx
cmp dword [esi + edx], 0x4550
sete cl
jne 0x401efe
mov eax, 0x14c
cmp ax, word [esi + edx + 4]
jne 0x401f02
mov eax, 0x10b
xor ecx, ecx
cmp ax, word [esi + edx + 0x18]
sete cl
test ecx, ecx
jne 0x401f20
mov dword [edi + 0x18], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x440]
xor ecx, esp
call fcn.00402ae3
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.004026a0
test eax, eax
je 0x401f76
mov ecx, dword [edi]
test ecx, ecx
je 0x401f6f
mov edx, dword [ecx + 0x3c]
mov eax, ecx
sub eax, dword [edx + ecx + 0x34]
mov dword [esp + 0x14], eax
je 0x401fe7
mov eax, dword [edx + ecx + 0xa0]
test eax, eax
je 0x401fe7
cmp dword [edx + ecx + 0xa4], 0
je 0x401fe7
lea esi, [eax + ecx]
test esi, esi
jne 0x401f8d
mov dword [edi + 0x18], 3
mov ecx, edi
call fcn.00402a20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x440]
xor ecx, esp
call fcn.00402ae3
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov ecx, dword [esi + 4]
add eax, ecx
je 0x401fe7
mov dword [esp + 0x18], 0x3000
nop
lea ebx, [ecx - 8]
mov edx, 0
shr ebx, 1
je 0x401fdb
nop dword [eax]
movzx eax, word [esi + edx*2 + 8]
mov ecx, eax
and ecx, 0xf000
cmp word [esp + 0x18], cx
jne 0x401fd3
mov ecx, dword [esp + 0x14]
and eax, 0xfff
add eax, dword [edi]
add eax, dword [esi]
add dword [eax], ecx
inc edx
cmp edx, ebx
jl 0x401fb0
mov ecx, dword [esi + 4]
mov eax, dword [esi + ecx]
add esi, ecx
mov ecx, dword [esi + 4]
add eax, ecx
jne 0x401fa0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x401f6f
mov ebx, dword [edi]
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x401f6f
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x3c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x444], edx
mov ecx, dword [eax + ebx + 0x80]
test ecx, ecx
je 0x4020de
cmp dword [eax + ebx + 0x84], 0
je 0x4020de
lea esi, [ecx + ebx]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x14], esi
test ecx, ecx
je 0x4020e2
mov eax, dword [edi]
add eax, ecx
push eax
mov dword [esp + 0x14], eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x402064
push dword [esp + 0x10]
call dword [esp + 0x20]
mov ebx, eax
test ebx, ebx
je 0x4020d0
mov ecx, dword [esi]
mov eax, dword [edi]
test ecx, ecx
je 0x402078
lea esi, [ecx + eax]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x10]
jmp 0x40207e
mov edx, dword [esi + 0x10]
lea esi, [edx + eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x4020b2
sub eax, esi
add eax, edx
test ecx, ecx
mov dword [esp + 0x10], eax
jns 0x402095
movzx eax, cx
jmp 0x40209c
mov eax, dword [edi]
add eax, 2
add eax, ecx
push eax
push ebx
call dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mov dword [ecx + esi], eax
add esi, 4
mov ecx, dword [esi]
test ecx, ecx
jne 0x40208e
mov esi, dword [esp + 0x14]
add esi, 0x14
mov dword [esp + 0x14], esi
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x4020dc
mov edx, dword [esp + 0x444]
jmp 0x402045
mov dword [edi + 0x18], 4
jmp 0x401f6f
mov ebx, dword [edi]
mov dword [esp + 0x10], ebx
mov esi, dword [edi + 4]
xor ebx, ebx
mov ecx, ebx
shl ecx, 0x18
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
mov dword [esp + ebx*4 + 0x40], ecx
inc ebx
cmp ebx, 0x100
jl 0x4020e7
mov ebx, dword [esp + 0x10]
xor edx, edx
test esi, esi
je 0x4021a0
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
mov ecx, edx
shl edx, 8
shr ecx, 0x18
xor ecx, eax
xor edx, dword [esp + ecx*4 + 0x40]
sub esi, 1
jne 0x402187
mov ecx, dword [edi + 0xc]
mov dword [edi + 8], edx
test ecx, ecx
je 0x401f6f
mov eax, dword [ecx + 0x14]
movaps xmm0, xmmword [0x413c30]
mov ecx, dword [ecx + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
movups xmmword [esp + 0x20], xmm0
mov dword [esp + 0x18], ecx
movaps xmm0, xmmword [0x413c40]
mov esi, dword [eax + 0x3c]
add esi, eax
mov dword [esp + 0x10], 0
movups xmmword [esp + 0x30], xmm0
movzx ebx, word [esi + 6]
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x40228b
add esi, 0x108
mov eax, ebx
nop dword [eax]
mov ebx, dword [esi]
mov dword [esp + 0x444], 0
test ebx, ebx
je 0x402277
mov edx, dword [esi + 0x14]
test edx, 0x2000000
je 0x402229
push 0x4000
push ebx
push dword [esi - 8]
call ecx
jmp 0x40226f
mov ecx, edx
mov eax, edx
shr eax, 0x1b
and eax, 4
shr ecx, 0x1d
and ecx, 2
add ecx, eax
mov eax, edx
shr eax, 0x1f
add ecx, eax
lea eax, [esp + 0x444]
push eax
mov ecx, dword [esp + ecx*4 + 0x24]
mov eax, ecx
or eax, 0x200
and edx, 0x4000000
cmove eax, ecx
push eax
push ebx
push dword [esi - 8]
call dword [esp + 0x2c]
test eax, eax
je 0x4022f7
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
add esi, 0x28
inc ebx
mov dword [esp + 0x10], ebx
cmp ebx, eax
jl 0x402200
mov esi, dword [edi]
test esi, esi
je 0x401f76
mov eax, dword [esi + 0x3c]
mov ecx, dword [eax + esi + 0xc0]
test ecx, ecx
je 0x4022c3
mov esi, dword [ecx + esi + 0xc]
test esi, esi
je 0x4022c3
mov eax, dword [esi]
test eax, eax
je 0x4022c3
push 0
push 1
push dword [edi]
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x4022b1
cmp dword [ebp + 8], 0
je 0x4022dd
mov edx, 1
mov ecx, edi
call fcn.004029f0
test eax, eax
je 0x401f6f
mov ecx, dword [esp + 0x44c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402ae3
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x18], 5
jmp 0x401f6f