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

Disassembly:
sub esp, 0x64
mov eax, dword [0x4310a0]
xor eax, esp
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x68]
push ebx
push ebp
mov dword [esp + 0x24], eax
mov eax, dword [0x4324b4]
xor ebp, ebp
cmp eax, ebp
push esi
push edi
mov dword [esp + 0x10], ebp
jne 0x407c25
push 0x5b0
mov dword [0x4324b4], 1
call fcn.004060c0
mov edi, eax
xor eax, eax
mov dword [0x434e18], edi
mov ecx, 0x16c
push 0xd48
rep stosd dword es:[edi], eax
call fcn.004060c0
mov edi, eax
xor eax, eax
mov dword [0x434e14], edi
mov ecx, 0x352
push 0x8000
rep stosd dword es:[edi], eax
call fcn.004060c0
push 0x434e40
mov dword [0x4324bc], eax
call fcn.00409e20
add esp, 0x10
mov ecx, dword [0x434e18]
mov ebx, 1
lea eax, [ecx + 0x38]
cmp dword [eax], ebp
je 0x407c55
inc ebx
add eax, 0x38
cmp ebx, 0x19
jle 0x407c33
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00412815
add esp, 0x64
ret
mov esi, ebx
imul esi, esi, 0x38
cmp ebx, 0xffffffff
mov dword [esi + ecx + 8], 0
je 0x407c40
mov eax, dword [esp + 0x7c]
test eax, eax
jns 0x407c80
and eax, 0x7fffffff
mov dword [esp + 0x10], 1
mov dword [esp + 0x7c], eax
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call fcn.00406fb0
mov edi, eax
add esp, 8
cmp edi, 0xffffffff
je 0x407e7c
push 0x40
lea edx, [esp + 0x34]
push edx
push edi
xor ebp, ebp
call fcn.00407050
add esp, 0xc
cmp eax, 0x40
jne 0x407cfe
cmp byte [esp + 0x30], 0x4d
jne 0x407cfe
cmp byte [esp + 0x31], 0x5a
jne 0x407cfe
mov eax, dword [esp + 0x6c]
push ebp
push eax
push edi
call fcn.00407020
push 2
lea ecx, [esp + 0x40]
push ecx
push edi
call fcn.00407050
add esp, 0x18
cmp eax, 2
jne 0x407cfe
cmp byte [esp + 0x30], 0x50
jne 0x407cfe
cmp byte [esp + 0x31], 0x45
jne 0x407cfe
mov eax, dword [esp + 0x7c]
test eax, eax
mov ebp, 1
jne 0x407e73
push ebp
push edi
call fcn.004073e0
mov ebp, eax
add esp, 8
cmp ebp, 0xffffffff
je 0x407e73
mov edx, dword [0x434e20]
push 0
add edx, ebp
push edx
push edi
call fcn.00407020
mov ecx, dword [0x434e20]
add ecx, ebp
add esp, 0xc
cmp eax, ecx
jne 0x407e73
push 0x16
lea edx, [esp + 0x18]
push edx
push edi
call fcn.00407050
add esp, 0xc
cmp eax, 0x16
jne 0x407e73
mov eax, dword [esp + 0x14]
xor ebp, ebp
cmp eax, 0x605444f
mov eax, dword [esp + 0x18]
jne 0x407d8d
test ax, ax
je 0x407d8d
mov eax, dword [0x434e18]
or dword [esi + eax + 8], 1
mov ecx, 4
mov al, cl
add al, 0x37
mov dl, 3
imul dl
xor byte [esp + ecx + 0x14], al
inc ecx
cmp ecx, 0x16
jb 0x407d75
mov ebp, dword [esp + 0x18]
jmp 0x407db2
mov cx, word [esp + 0x1e]
cmp cx, word [esp + 0x1c]
jne 0x407e73
cmp word [esp + 0x1a], 0
jne 0x407e73
test ax, ax
jne 0x407e73
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407dcb
mov edx, dword [0x434e18]
test byte [esi + edx + 8], 1
je 0x407e73
call fcn.00409c40
mov ecx, dword [0x434e18]
mov dword [esi + ecx], eax
mov edx, dword [0x434e18]
mov dword [esi + edx + 4], edi
mov eax, dword [0x434e18]
mov byte [esi + eax + 0x20], 0
mov ecx, dword [0x434e20]
mov edx, dword [esp + 0x24]
mov eax, dword [0x434e18]
add edx, ecx
mov dword [esi + eax + 0xc], edx
mov ecx, dword [0x434e18]
mov edx, dword [esp + 0x20]
mov dword [esi + ecx + 0x10], edx
mov eax, dword [0x434e18]
mov ecx, dword [esi + eax + 0xc]
mov dword [esi + eax + 0x18], ecx
mov edx, dword [0x434e18]
mov eax, dword [esp + 0x1c]
mov dword [esi + edx + 0x1c], eax
mov ecx, dword [0x434e18]
mov edx, dword [esi + ecx]
mov eax, dword [esp + 0x20]
mov ecx, dword [0x434e20]
push ebp
push edx
mov edx, dword [esp + 0x2c]
push eax
add edx, ecx
push edx
push edi
call fcn.00407580
add esp, 0x14
test eax, eax
jne 0x407e91
mov eax, dword [0x434e18]
mov ecx, dword [esi + eax]
push ecx
call fcn.00409ce0
mov edx, dword [0x434e18]
add esp, 4
mov dword [esi + edx], 0
push edi
call fcn.00407000
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00412815
add esp, 0x64
ret
mov ecx, dword [esp + 0x7c]
cmp ecx, 1
je 0x407ebd
cmp ecx, 2
je 0x407ebd
cmp eax, 0xffffffff
mov ecx, dword [0x434e18]
mov dword [esi + ecx + 0x14], 0
je 0x407ed9
push eax
call fcn.004060d0
add esp, 4
jmp 0x407ed9
cmp eax, 0xffffffff
mov edx, dword [0x434e18]
mov dword [esi + edx + 0x14], eax
jne 0x407ed9
mov eax, dword [0x434e18]
mov dword [esi + eax + 0x14], 0xffffffff
mov ecx, dword [0x434e18]
mov edx, dword [esi + ecx]
push 0
push edx
call fcn.00409810
mov ecx, dword [esp + 0x78]
add esp, 8
or ebx, 0x4f440000
pop edi
mov ebp, ebx
pop esi
mov eax, ebp
pop ebp
pop ebx
xor ecx, esp
call fcn.00412815
add esp, 0x64
ret