Function at 0x460dd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7fcd
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x514080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], ecx
mov edi, dword [ebp + 0xc]
mov ecx, edi
call fcn.004037c0
xor bl, bl
call fcn.004046f0
mov dword [ebp - 0x20], eax
test eax, eax
je 0x461132
mov eax, dword [eax]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4e1514]
mov ecx, dword [ebp - 0x20]
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
call fcn.004046f0
mov dword [ebp - 0x20], eax
test eax, eax
je 0x461132
mov eax, dword [eax]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4e1514]
mov ecx, dword [ebp - 0x20]
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 3
xor ecx, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax]
cmp dword [eax - 0xc], ecx
jle 0x4610ba
test ecx, ecx
js 0x46113c
cmp ecx, dword [eax - 0xc]
jg 0x46113c
movzx eax, word [eax + ecx*2]
mov ecx, eax
sub eax, 0x25
je 0x460fa7
sub eax, 0x36
je 0x460f98
sub eax, 2
je 0x460f5b
mov eax, ecx
mov dword [ebp - 0x20], eax
test bl, bl
je 0x460f05
mov eax, dword [ebp - 0x10]
mov edi, dword [eax - 0xc]
lea esi, [edi + 1]
test esi, esi
js 0x46113c
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x460ede
push esi
lea ecx, [ebp - 0x10]
call fcn.00402540
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov word [eax + edi*2], cx
mov eax, dword [ebp - 0x10]
cmp esi, dword [eax - 8]
jg 0x46113c
mov edi, dword [ebp + 0xc]
xor ecx, ecx
mov dword [eax - 0xc], esi
mov eax, dword [ebp - 0x10]
mov word [eax + esi*2], cx
jmp 0x4610a5
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov edi, dword [eax - 0xc]
lea esi, [edi + 1]
test esi, esi
js 0x46113c
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, esi
or eax, ecx
jge 0x460f34
push esi
mov ecx, edx
call fcn.00402540
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x20]
mov word [eax + edi*2], cx
mov eax, dword [edx]
cmp esi, dword [eax - 8]
jg 0x46113c
mov edi, dword [ebp + 0xc]
xor ecx, ecx
mov dword [eax - 0xc], esi
mov eax, dword [edx]
mov word [eax + esi*2], cx
jmp 0x4610a5
lea eax, [ebp - 0x14]
xor bl, bl
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call fcn.0044d2a0
mov ecx, eax
mov dword [ebp - 0x20], ecx
test ecx, ecx
jg 0x46112d
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x46112d
push ecx
push eax
mov ecx, edi
call fcn.004025b0
jmp 0x4610a5
lea ecx, [ebp - 0x10]
mov bl, 1
call fcn.004037c0
jmp 0x4610a5
test bl, bl
je 0x46109b
push 0x208
mov esi, 0x104
call fcn.004a18f7
mov edi, eax
add esp, 4
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 4
push esi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x46102c
nop dword [eax]
cmp eax, esi
jb 0x461049
add esi, esi
mov byte [ebp - 4], 3
push 2
push edi
call fcn.004a18b4
xor ecx, ecx
mov dword [ebp - 0x18], 0
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004a18f7
mov edi, eax
add esp, 0xc
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 4
push esi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x460fe0
mov byte [ebp - 4], 3
push 2
push edi
call fcn.004a18b4
add esp, 8
mov dword [ebp - 0x18], 0
mov ebx, 0xcb
jmp 0x4610bc
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461050
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x14]
call fcn.00403890
mov byte [ebp - 4], 3
push 2
push edi
call fcn.004a18b4
mov eax, dword [ebp - 0x14]
add esp, 8
xor ebx, ebx
mov dword [ebp - 0x18], 0
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x4610bc
mov edi, dword [ebp + 0xc]
push ecx
push eax
mov ecx, edi
call fcn.004025b0
xor bl, bl
jmp 0x4610a5
lea ecx, [ebp - 0x10]
call fcn.004037c0
mov bl, 1
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
inc ecx
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax]
cmp ecx, dword [eax - 0xc]
jl 0x460e75
xor ebx, ebx
mov byte [ebp - 4], 1
or ecx, 0xffffffff
mov edx, dword [ebp - 0x14]
mov eax, ecx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4610ec
mov edi, dword [edx]
push edx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x461117
mov edi, dword [eax]
push eax
mov edx, dword [edi]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x4e1514]
mov ecx, edi
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp - 0x20]
jmp 0x4610bc
push 0x80004005
call fcn.00402720
push 0x80070057
call fcn.00402720
int3