Function at 0x421f24
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10228
call fcn.00453130
mov eax, dword [0x49f2a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10220], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x10214], eax
mov eax, dword [ebp + 0x14]
push esi
push edi
mov dword [ebp - 0x10224], eax
mov eax, dword [ebp + 0x18]
mov ebx, 0x104
push ebx
mov dword [ebp - 0x10218], eax
call fcn.0042f52e
mov dword [ebp - 0x10210], eax
push 0x103
lea eax, [ebp - 0x20c]
push eax
call fcn.00421edb
mov esi, dword [sym.imp.___total_physical_size__lu_MB_CreateFileA]
xor edi, edi
test eax, eax
je 0x42202e
push 0xc
lea eax, [ebp - 0x20c]
push eax
push str._systemroot_
call fcn.00450c23
add esp, 0xc
test eax, eax
jne 0x421fee
push ebx
lea eax, [ebp - 0x108]
push eax
push str.SYSTEMROOT
call dword [sym.imp.___total_physical_size__lu_MB_GetEnvironmentVariableA]
test eax, eax
je 0x421fee
push dword [ebp - 0x10214]
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x108]
push eax
push str._s_s_s
push dword [ebp - 0x10210]
call fcn.00450c76
add esp, 0x14
jmp 0x42200e
push dword [ebp - 0x10214]
lea eax, [ebp - 0x20c]
push eax
push 0x4696e0
push dword [ebp - 0x10210]
call fcn.00450c76
add esp, 0x10
push edi
push edi
push 2
push edi
push 7
push 2
push dword [ebp - 0x10210]
call esi
mov dword [ebp - 0x1021c], eax
cmp eax, 0xffffffff
jne 0x422147
push ebx
lea eax, [ebp - 0x108]
push eax
push str.TEMP
call dword [sym.imp.___total_physical_size__lu_MB_GetEnvironmentVariableA]
test eax, eax
je 0x422085
push dword [ebp - 0x10214]
lea eax, [ebp - 0x108]
push eax
push 0x4696e0
push dword [ebp - 0x10210]
call fcn.00450c76
add esp, 0x10
push edi
push edi
push 2
push edi
push 7
push 2
push dword [ebp - 0x10210]
call esi
mov dword [ebp - 0x1021c], eax
cmp eax, 0xffffffff
jne 0x422147
push ebx
lea eax, [ebp - 0x108]
push eax
push str.SYSTEMROOT
call dword [sym.imp.___total_physical_size__lu_MB_GetEnvironmentVariableA]
mov ebx, 0xc0000000
test eax, eax
je 0x4220dc
push dword [ebp - 0x10214]
lea eax, [ebp - 0x108]
push eax
push str._s_system32drivers_s
push dword [ebp - 0x10210]
call fcn.00450c76
add esp, 0x10
push edi
push edi
push 2
push edi
push 3
push ebx
push dword [ebp - 0x10210]
call esi
mov dword [ebp - 0x1021c], eax
cmp eax, 0xffffffff
jne 0x422147
push dword [ebp - 0x10214]
push str.C:_s
push dword [ebp - 0x10210]
call fcn.00450c76
add esp, 0xc
push edi
push edi
push 2
push edi
push 3
push ebx
push dword [ebp - 0x10210]
call esi
mov dword [ebp - 0x1021c], eax
cmp eax, 0xffffffff
jne 0x422147
push dword [ebp - 0x10210]
push str._nCant_create_required_Driver_file__s
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x126b
push str.NTCOPY
call fcn.0044dc85
add esp, 0x14
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450b32
leave
ret 0x14
push dword [ebp - 0x10210]
call fcn.004503c5
mov ebx, dword [ebp - 0x10220]
pop ecx
mov ecx, dword [ebp - 0x10218]
mov dword [ecx], eax
test byte [ebx + 0x1c], 2
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x10214], eax
lea eax, [ebx + 0x20]
mov dword [ebp - 0x10218], eax
je 0x422198
push eax
lea eax, [ebp - 0x1020c]
push eax
call fcn.0041a030
mov dword [ebp - 0x10214], eax
lea eax, [ebp - 0x1020c]
mov dword [ebp - 0x10218], eax
test byte [ebx + 0x1c], 1
je 0x4221c4
push dword [ebp - 0x10214]
push dword [ebp - 0x10218]
push 0x4ac38c
call fcn.0044283b
mov dword [ebp - 0x10214], eax
mov dword [ebp - 0x10218], 0x4ac38c
mov eax, dword [ebp - 0x10214]
cmp eax, dword [ebx + 0x14]
je 0x4221e0
push str.BytesToWrite___Input__DH.ExpandedSize_n
call fcn.00450f5c
pop ecx
call dword [sym.imp.___total_physical_size__lu_MB_DebugBreak]
push edi
lea eax, [ebp - 0x10228]
push eax
push dword [ebp - 0x10214]
push dword [ebp - 0x10218]
push dword [ebp - 0x1021c]
call dword [sym.imp.___total_physical_size__lu_MB_WriteFile]
test eax, eax
je 0x422245
mov eax, dword [ebp - 0x10228]
cmp eax, dword [ebp - 0x10214]
jne 0x422245
mov ebx, dword [ebp - 0x10224]
cmp ebx, edi
je 0x42222e
push edi
push edi
push 3
push edi
push 7
push edi
push dword [ebp - 0x10210]
call esi
mov dword [ebx], eax
push dword [ebp - 0x1021c]
call dword [sym.imp.___total_physical_size__lu_MB_CloseHandle]
mov eax, dword [ebp - 0x10210]
jmp 0x422136
mov esi, dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
call esi
push eax
push dword [ebp - 0x10214]
push str.could_not_write__u_bytes_to_driver_file__error:_u__n
call esi
push eax
push 0x1297
push str.NTCOPY
call fcn.0044dc85
add esp, 0x18
push 1
call fcn.00451974
int3