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

Disassembly:
push 0xffffffffffffffff
push 0x4ea897
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x308
push ebx
push esi
mov esi, dword [esp + 0x320]
xor ebx, ebx
push esi
mov dword [esp + 0x10], ebx
call fcn.0044dc40
mov ecx, dword [esp + 0x328]
add esp, 4
test al, al
setne al
cmp al, bl
mov byte [ecx], al
je 0x465498
mov word [esp + 0x40], bx
mov dword [esp + 8], ebx
lea edx, [esp + 0x28]
push edx
push ebx
push esi
mov dword [esp + 0x324], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.0041f3a1
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x465498
push 2
call fcn.00449130
add esp, 4
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x4652ee
mov byte [eax], bl
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov eax, dword [esp + 0x28]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0x324], 2
mov dword [esp + 0x3c], esi
call fcn.0044dcf0
mov esi, dword [esp + 0x24]
add esp, 0xc
cmp esi, ebx
jg 0x465373
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x465345
mov edx, dword [0x51d3c8]
add eax, 0xfffffff8
push eax
push ebx
push edx
call esi
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x46535a
add eax, 0xfffffff8
push eax
mov eax, dword [0x51d3c8]
push ebx
push eax
call esi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x308]
mov dword fs:[0], ecx
add esp, 0x314
ret
push 0x51d5ec
mov dword [esp + 0x24], 0x51d5ec
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x318], 3
call fcn.004483d0
lea ecx, [esp + 0x10]
call fcn.00443730
mov ecx, dword [esp + 0x14]
push ecx
mov eax, esi
mov byte [esp + 0x31c], 4
call fcn.004484b0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4653d2
mov edx, dword [esi]
lea eax, [esp + 0xc]
push eax
push esi
call dword [edx + 0xc]
mov eax, dword [esp + 0xc]
cmp eax, ebx
jne 0x4653da
mov ecx, dword [esi]
push esi
call dword [ecx + 8]
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x46542b
mov esi, eax
mov eax, dword [0x51d5a4]
cmp eax, ebx
mov byte [esp + 0x318], 3
je 0x4653f5
cmp dword [esp + 0x10], ebx
jne 0x4653f5
call eax
push 0x51d5ec
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [esp + 0x14]
call fcn.00416732
lea ecx, [esp + 0x30]
call fcn.00416732
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x308]
mov dword fs:[0], ecx
add esp, 0x314
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x104
lea edx, [esp + 0x44]
push edx
push 0x4f3c00
call esi
cmp eax, ebx
jg 0x4654b1
push 0x104
lea eax, [esp + 0x44]
push eax
push 0x4f3bf4
call esi
cmp eax, ebx
jg 0x4654b1
mov eax, dword [0x51d5a4]
cmp eax, ebx
mov byte [esp + 0x318], 3
je 0x465474
cmp dword [esp + 0x10], ebx
jne 0x465474
call eax
lea ecx, [esp + 0x20]
call fcn.00416591
lea ecx, [esp + 0x14]
call fcn.00416732
lea ecx, [esp + 0x30]
call fcn.00416732
lea ecx, [esp + 8]
call fcn.00417e50
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x308]
mov dword fs:[0], ecx
add esp, 0x314
ret
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + eax*2 + 0x44]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x2c], 0x63
mov dword [esp + 0x44], ecx
lea esp, [esp]
call fcn.00445d10
mov ebx, eax
call edi
add ebx, eax
push ebx
call ebp
mov edx, dword [esp + 0x48]
push eax
push str.pecmd_bmp._lu._lu.tmp
push edx
call esi
add esp, 0x10
push 0
push 0x80
push 1
push 0
push 5
push 0x40000000
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x2c]
call fcn.00417e55
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x46557a
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
dec dword [esp + 0x2c]
jns 0x4654e0
mov eax, dword [0x51d5a4]
test eax, eax
mov byte [esp + 0x320], 3
je 0x46554f
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x46554f
call eax
lea ecx, [esp + 0x28]
call fcn.00416591
lea ecx, [esp + 0x1c]
call fcn.00416732
lea ecx, [esp + 0x38]
call fcn.00416732
lea ecx, [esp + 0x10]
call fcn.00417e50
xor eax, eax
jmp 0x46560c
mov edx, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
push eax
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x10]
call fcn.004165a1
push 0x10
push 0
push 0
push 0
lea edx, [esp + 0x58]
push edx
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [0x51d5a4]
test eax, eax
mov esi, dword [esp + 0x14]
mov byte [esp + 0x320], 3
je 0x4655e6
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x4655e6
call eax
lea ecx, [esp + 0x28]
call fcn.00416591
lea ecx, [esp + 0x1c]
call fcn.00416732
lea ecx, [esp + 0x38]
call fcn.00416732
lea ecx, [esp + 0x10]
call fcn.00417e50
mov eax, esi
mov ecx, dword [esp + 0x318]
pop edi
pop ebp
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x314
ret