Function at 0x40a28c
Capabilities:
Delete file
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b2d81
mov eax, dword fs:[0]
push eax
sub esp, 0x360
mov eax, dword [0x4d897c]
xor eax, esp
mov dword [esp + 0x358], eax
push ebx
push esi
push edi
mov eax, dword [0x4d897c]
xor eax, esp
push eax
lea eax, [esp + 0x370]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
xor eax, eax
push 0x206
mov word [esp + 0x160], ax
xor ebx, ebx
lea eax, [esp + 0x162]
push ebx
push eax
call fcn.0049ac70
add esp, 0xc
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], ebx
mov byte [esp + 0xec], bl
push 0x104
lea eax, [esp + 0x160]
push eax
push 0x4c09b4
mov dword [esp + 0x384], ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov eax, dword [0x4dec90]
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40a342
lea edi, [esp + 0x15c]
sub eax, edx
sub edi, 2
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40a359
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push eax
mov edi, 0x4c09bc
call fcn.004017e2
push 0x77
push ecx
mov byte [esp + 0x384], 1
mov eax, esp
mov dword [esp + 0x20], esp
push eax
lea edi, [esp + 0x16c]
call fcn.004017e2
mov byte [esp + 0x384], bl
call fcn.00403428
add esp, 0xc
cmp eax, ebx
je 0x40a55e
push 0xf
pop eax
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe0], ebx
mov byte [esp + 0xd0], bl
mov dword [esp + 0x11c], eax
mov dword [esp + 0x118], ebx
mov byte [esp + 0x108], bl
mov eax, edi
push eax
lea esi, [esp + 0x10c]
mov byte [esp + 0x37c], 3
call fcn.00403595
cmp dword [eax + 0x14], 0x10
pop ecx
jb 0x40a409
mov eax, dword [eax]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0040b473
mov byte [esp + 0x378], 4
cmp dword [esp + 0x80], ebx
je 0x40a50c
jmp 0x40a4c3
push 0xa
lea eax, [esp + eax + 0x20]
push eax
call fcn.0040c11d
movzx eax, al
push eax
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0040c341
add esp, 0xc
lea eax, [esp + 0xd0]
push eax
lea eax, [esp + 0xf0]
push eax
lea eax, [esp + 0x12c]
push eax
call fcn.0040c17b
add esp, 0xc
lea ecx, [esp + 0x140]
mov byte [esp + 0x378], 5
call fcn.0040c1fd
mov esi, eax
lea edi, [esp + 0xec]
mov byte [esp + 0x378], 6
call fcn.00407295
push ebx
push 1
lea ecx, [esp + 0x148]
call fcn.0040197a
push ebx
push 1
lea ecx, [esp + 0x12c]
mov byte [esp + 0x380], 4
call fcn.0040197a
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
test byte [esp + eax + 0x28], 1
je 0x40a42e
lea eax, [esp + 0x2c]
call fcn.0040be3f
test eax, eax
jne 0x40a50c
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
lea ecx, [esp + ecx + 0x1c]
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], ebx
jne 0x40a4fb
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x40a50c
push ebx
call fcn.00404ef5
lea ecx, [esp + 0x84]
mov byte [esp + 0x378], 3
call fcn.0040b5e8
lea eax, [esp + 0x84]
push eax
mov dword [esp + 0x88], vtable.std::ios_base.0
call fcn.0045bdcd
pop ecx
push ebx
push 1
lea ecx, [esp + 0x110]
call fcn.0040197a
push ebx
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x380], bl
call fcn.0040197a
push 0x424
call fcn.0045c9b6
pop ecx
mov dword [esp + 0x14], eax
mov byte [esp + 0x378], 7
cmp eax, ebx
je 0x40a584
mov esi, eax
call fcn.0040c45c
mov edi, eax
jmp 0x40a586
xor edi, edi
mov byte [esp + 0x378], bl
cmp dword [esp + 0xfc], ebx
je 0x40a614
xor eax, eax
mov dword [esp + 0xe4], 7
mov dword [esp + 0xe0], ebx
mov word [esp + 0xd0], ax
mov byte [esp + 0x378], 8
cmp dword [esp + 0x100], 0x10
mov eax, dword [esp + 0xec]
jae 0x40a5d2
lea eax, [esp + 0xec]
push eax
lea esi, [esp + 0xd4]
call fcn.00403525
cmp dword [esp + 0xe8], 8
mov eax, dword [esp + 0xd4]
pop ecx
jae 0x40a5f3
mov eax, esi
lea ecx, [edi + 0x3a0]
call fcn.0041a330
push ebx
push 1
lea ecx, [esp + 0xd8]
mov byte [esp + 0x380], bl
call fcn.00401adc
mov eax, dword [esp + 0x10]
push SysReAllocStringLen
push 0x1fe
push 0x1ea
push ebx
push ebx
push 0x12ce0000
push 0x4be374
push dword [eax + 4]
mov eax, edi
call fcn.0041ff10
mov ecx, edi
call fcn.00420220
push edi
call fcn.0041ffe0
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 1
lea ecx, [esp + 0xf4]
call fcn.0040197a
mov ecx, dword [esp + 0x370]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x358]
xor ecx, esp
call fcn.00494bb0
mov esp, ebp
pop ebp
ret 4