Function at 0x405b40
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x601c
call fcn.004161a4
push edi
push esi
push ebx
add esp, 0xfffffff8
push 0x4058f5
lea ebx, [ebp - 0x2000]
push ebx
call fcn.004037e4
add esp, 0xfffffffc
push ebx
push 0x4058f6
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push ebx
push 0x405905
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x42d190
push 0x405918
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x42d190
push 0x405928
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x4044cb
push 0x40593c
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x4044cb
push 0x405960
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x427098
push 0x40597f
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x427098
push 0x405990
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push ebx
push 0x4059a5
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push ebx
push 0x4059b5
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x42d190
push 0x4059c9
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x42d190
push 0x4059da
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x4044cb
push 0x4059ef
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x4044cb
push 0x405a20
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x427098
push 0x405a40
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x427098
push 0x405a52
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push ebx
push 0x405a80
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x42d190
push 0x405ac0
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0xfffffffc
push 0x4044cb
push 0x405b00
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffffc
push 0x427098
push 0x405b22
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
call sub.KERNEL32.dll_GetEnvironmentStrings
mov dword [ebp - 0x6004], eax
add esp, 0x10
test eax, eax
je 0x405de1
mov dword [ebp - 0x6008], eax
cmp byte [eax], 0
je 0x405de1
nop
add esp, 0xfffffff8
mov eax, dword [ebp - 0x6008]
push eax
lea ebx, [ebp - 0x4000]
push ebx
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push 0x3d
push ebx
call sub.msvcrt.dll_strchr
mov esi, eax
add esp, 0x20
test esi, esi
je 0x405dba
mov byte [esi], 0
add esp, 0xfffffffc
push ebx
push 0x405b3a
lea ebx, [ebp - 0x6000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffffc
inc esi
push esi
push ebx
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__strupr
add esp, 0xfffffffc
push esi
push ebx
mov eax, dword [ebp + 8]
push eax
call fcn.0040584c
add esp, 0x20
mov edi, dword [ebp - 0x6008]
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add dword [ebp - 0x6008], ecx
mov eax, dword [ebp - 0x6008]
cmp byte [eax], 0
jne 0x405d4c
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6004]
push eax
call sub.KERNEL32.dll_FreeEnvironmentStringsA
lea esp, [ebp - 0x6028]
pop ebx
pop esi
pop edi
leave
ret