Function at 0x413a9c
Capabilities:
Create thread
Delete file
Get disk information
Get disk size
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push ebx
push esi
xor eax, eax
push ebp
push 0x413d18
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.0040ddac
test al, al
je 0x413cfd
mov ebx, sub.kernel32.dll_LoadLibraryA
mov esi, sub.kernel32.dll_GetProcAddress
call fcn.004137ec
lea edx, [ebp - 4]
mov eax, 0x413d30
call fcn.0040f448
mov eax, dword [ebp - 4]
call fcn.00403f88
push eax
call ebx
mov ebx, eax
lea edx, [ebp - 8]
mov eax, 0x413d48
call fcn.0040f448
mov eax, dword [ebp - 8]
call fcn.00403f88
push eax
push ebx
call esi
mov dword [0x416bcc], eax
lea edx, [ebp - 0xc]
mov eax, 0x413d6c
call fcn.0040f448
mov eax, dword [ebp - 0xc]
call fcn.00403f88
push eax
push ebx
call esi
mov dword [0x416bd4], eax
call fcn.00412c08
mov eax, 0x64
call fcn.00402914
cmp eax, 0x3e8
jne 0x413cfd
fld xword [0x413d80]
call fcn.004027e8
fcomp dword [0x413d8c]
fnstsw ax
sahf
jne 0x413b5e
push 0x4d
call sub.kernel32.dll_CreateTapePartition
push 8
push 0x4f
push 0x2e
call sub.kernel32.dll_DeviceIoControl
push 0x60
push 0x47
push 1
call sub.kernel32.dll_SetHandleCount
push 0x5c
push 0x50
call sub.kernel32.dll_QueryDosDeviceW
push 0x4c
push 0x3c
push 0x61
call sub.kernel32.dll_GetNumberFormatW
fld xword [0x413d90]
call fcn.004027f8
fcomp dword [0x413d9c]
fnstsw ax
sahf
je 0x413ba3
call sub.kernel32.dll_ReadConsoleOutputAttribute
push 0x413da8
call sub.kernel32.dll_SetSystemTimeAdjustment
call sub.kernel32.dll_ExpandEnvironmentStringsA
test al, al
jne 0x413cfd
push 0x23
push 0x30
push 0x24
call sub.kernel32.dll_ReadConsoleOutputA
push 0x1a
push 0x24
call sub.kernel32.dll_DeleteFileW
push 0
push 0x9d
call fcn.00404868
add esp, 8
fcomp dword [0x413db4]
fnstsw ax
sahf
je 0x413c04
fld xword [0x413db8]
call fcn.004027f8
call fcn.0040283c
cmp edx, 0
jne 0x413c0b
cmp eax, 0x275
jne 0x413c0b
push 0x15
call sub.kernel32.dll_EnumTimeFormatsA
fld xword [0x413dc4]
call fcn.004027e8
fcomp dword [0x413dd0]
fnstsw ax
sahf
jne 0x413c2c
push 0x4d
push 2
push 0x20
call sub.kernel32.dll_PeekNamedPipe
fld xword [0x413dd4]
fldln2
fxch st(1)
fyl2x
fcomp dword [0x413de0]
fnstsw ax
sahf
jne 0x413c52
push 0x17
call sub.kernel32.dll_SetDefaultCommConfigA
test al, al
jne 0x413cfd
call sub.kernel32.dll_GlobalHandle
fld xword [0x413de4]
call fcn.004027f8
fmul st(0)
fcomp dword [0x413df0]
fnstsw ax
sahf
je 0x413c74
call sub.kernel32.dll_SetSystemPowerState
push 0x3f
push 0x2f
push 1
call sub.kernel32.dll_InitializeCriticalSection_1
push 0x51
push 0xf
call sub.kernel32.dll_GetDiskFreeSpaceA
push 0x413dfc
push 0x413e14
push 0x413e2c
call sub.kernel32.dll_SetEvent
push 0x39
call sub.kernel32.dll_QueryDosDeviceW
push 0x49
push 0x24
call sub.kernel32.dll_FormatMessageW
mov eax, 0xc6
call fcn.00402914
cmp eax, 0x27f
je 0x413ccc
push 0x413e40
push 0x413e54
call sub.kernel32.dll_GetOEMCP
call sub.kernel32.dll_CreateThread
fld xword [0x413e60]
call fcn.00402818
fcomp dword [0x413e6c]
fnstsw ax
sahf
je 0x413cfd
mov eax, 0x18
call fcn.00402914
cmp eax, 0x1c2
je 0x413cfd
call sub.kernel32.dll_EnumDateFormatsA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x413d1f
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00403b5c
ret