Function at 0x420dec
Capabilities:
Encode data using xor
Query environment variable
Read file via mapping

Disassembly:
push ebp
mov ecx, 0x41
mov ebp, esp
push edi
push esi
mov esi, eax
xor eax, eax
push ebx
lea ebx, [ebp - 0x11c]
mov edi, ebx
sub esp, 0x17c
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.KERNEL32.dll_K32GetModuleFileNameExA
sub esp, 0x10
test eax, eax
jne 0x420e9a
mov byte [ebp - 0x11c], 0
mov ecx, 0xb
lea edi, [ebp - 0x154]
mov dword [ebp - 0x154], 0x776d6f3c
mov dword [ebp - 0x150], 0x72696324
mov dword [ebp - 0x14c], 0x346d66
mov eax, ecx
mov esi, 0xb
xor edx, edx
div esi
xor byte [ebp + ecx - 0x15f], dl
inc ecx
cmp ecx, 0x16
jne 0x420e60
mov dword [esp + 0xc], 0x103
mov dword [esp + 8], edi
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strncpy_s]
jmp 0x421145
cmp eax, 0x103
jbe 0x420ea5
mov byte [ebp - 0x19], 0
xor eax, eax
mov dword [esp], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x421145
xor ecx, ecx
xor edi, edi
mov dword [esp + 8], 0x1000002
mov dword [esp + 4], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 0x18
test eax, eax
mov dword [ebp - 0x15c], eax
je 0x42113f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x42113f
xor edx, edx
mov dword [esp + 4], 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x160], eax
sub esp, 0x14
test eax, eax
je 0x421133
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x154], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x150], eax
xor eax, eax
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x154]
mov dword [esp + 4], eax
mov dword [esp], 0x4244c0
call fcn.00421150
push eax
push eax
mov eax, dword [ebp - 0x160]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.004243e0
mov esi, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x154], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x14c], 1
mov dword [ebp - 0x150], eax
lea eax, [ebp - 0x154]
mov dword [esp + 4], eax
mov dword [esp], 0x4244c0
call fcn.00421150
push eax
push eax
test esi, esi
je 0x421123
mov dword [ebp - 0x154], 0xc1eb1542
mov dword [ebp - 0x150], 0x7c90ec48
mov byte [ebp - 0x14c], 0x42
mov al, byte [0x4dd678]
test al, al
jne 0x421061
mov dword [esp], 0x4dd678
call fcn.004ceb90
test eax, eax
je 0x421061
lea eax, [ebp - 0x154]
mov ecx, 0x4df2a0
mov dword [esp], eax
call fcn.0042e96c
push eax
mov dword [esp], 0x4cffbc
call fcn.004013f0
mov dword [esp], 0x4dd678
call fcn.004cec60
mov ecx, 0x4df2a0
lea edi, [ebp - 0x154]
mov esi, 0x4dd0e0
call fcn.0042e93c
mov dword [esp], 0x4df2a0
call fcn.00422510
mov ecx, 0x37
mov dword [ebp - 0x158], 0xf990c662
rep movsb byte es:[edi], byte [esi]
mov al, byte [0x4dd670]
test al, al
jne 0x4210d8
mov dword [esp], 0x4dd670
call fcn.004ceb90
test eax, eax
je 0x4210d8
lea eax, [ebp - 0x154]
mov ecx, 0x4df260
mov dword [esp], eax
call fcn.0042e834
push eax
mov dword [esp], 0x4cffc0
call fcn.004013f0
mov dword [esp], 0x4dd670
call fcn.004cec60
mov ecx, 0x4df260
call fcn.0042e804
mov dword [esp], 0x4df260
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4210fa
lea eax, [ebp - 0x158]
call eax
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
mov eax, dword [ebp - 0x15c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
push edi
mov dword [esp], ebx
call esi
jmp 0x421144
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ecx
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
call edi
push edx
mov dword [esp], ebx
call edi
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret