Function at 0x40fd44
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x40fd4d
mov eax, dword [ebp - 4]
add esp, 0xffffffb8
push ebx
push esi
push edi
mov dword [ebp - 4], edx
test cl, cl
je 0x40fd76
lea edx, [ebp - 0x408]
mov cl, 1
call fcn.0040214c
jmp 0x40fd86
push eax
lea eax, [ebp - 0x408]
push eax
call fcn.0043bd24
add esp, 8
lea eax, [ebp - 0x1028]
call fcn.004031a0
cmp byte [ebp - 0x408], 0
je 0x40fe00
cmp byte [ebp + 0x18], 0
je 0x40fdb5
lea edx, [ebp - 0x408]
lea eax, [ebp - 0x1028]
xor ecx, ecx
call fcn.00403388
jmp 0x40fdcc
push 0
push 0
lea edx, [ebp - 0x408]
lea eax, [ebp - 0x1028]
xor ecx, ecx
call fcn.00403234
test al, al
jne 0x40fe10
cmp byte [ebp + 0x18], 0
je 0x40fde5
mov eax, 0x448c38
mov edx, 6
call fcn.00433d14
xor eax, eax
push eax
lea eax, [ebp - 0x1028]
mov edx, 2
call fcn.004031f0
pop eax
jmp 0x410201
lea eax, [ebp - 0x1028]
mov edx, 1
call fcn.00403cb8
xor esi, esi
lea eax, [ebp - 0x1034]
mov edx, 0x405
call fcn.00403e58
jmp 0x40fe33
add esi, ebx
lea eax, [ebp - 0x1034]
mov edx, ebx
call fcn.00401398
mov edx, dword [ebp - 0x1034]
add edx, esi
lea eax, [ebp - 0x1028]
mov ecx, 0x400
call fcn.00403838
mov ebx, eax
test eax, eax
jne 0x40fe24
push 5
push 0
mov edx, dword [ebp - 0x1034]
add edx, esi
push edx
call fcn.0043bba4
add esp, 0xc
cmp dword [ebp + 0x14], 3
je 0x40fe8b
cmp dword [ebp + 0x14], 0
jne 0x4100b9
mov edx, esi
mov eax, dword [ebp - 0x1034]
call fcn.0040fd08
test al, al
je 0x4100b9
mov edx, dword [ebp - 0x1030]
sar edx, 1
jns 0x40fe98
adc edx, 0
inc edx
lea eax, [ebp - 0x1040]
call fcn.0040771c
mov eax, 2
jmp 0x40fede
mov edx, dword [ebp - 0x1034]
xor ecx, ecx
mov cl, byte [edx + eax]
mov edx, dword [ebp - 0x1034]
movzx edx, byte [edx + eax + 1]
shl edx, 8
add cx, dx
lea edx, [eax - 2]
sar edx, 1
jns 0x40fed1
adc edx, 0
mov ebx, dword [ebp - 0x1040]
mov word [ebx + edx*2], cx
add eax, 2
mov edx, dword [ebp - 0x1030]
dec edx
cmp eax, edx
jl 0x40feab
mov esi, dword [ebp - 0x1040]
lea eax, [ebp - 0x104c]
call fcn.00401178
jmp 0x41008a
mov edi, esi
xor eax, eax
jmp 0x40ff22
cmp byte [ebp + 0xc], 0
je 0x40ff1f
cmp word [edi], 0x2f
jne 0x40ff1f
cmp word [edi + 2], 0x2f
jne 0x40ff1f
mov word [edi], 0
mov eax, edi
add edi, 2
cmp word [edi], 0xd
je 0x40ff34
cmp word [edi], 0xa
je 0x40ff34
cmp word [edi], 0
jne 0x40ff05
mov word [edi], 0
test eax, eax
jne 0x40ff3f
mov eax, edi
add eax, 0xfffffffe
cmp esi, eax
ja 0x40ff5e
cmp word [eax], 0x20
je 0x40ff52
cmp word [eax], 9
jne 0x40ff5e
mov word [eax], 0
sub eax, 2
cmp esi, eax
jbe 0x40ff46
cmp word [esi], 0
je 0x410076
mov eax, esi
call fcn.0040bde0
mov ebx, eax
mov eax, ebx
sub eax, dword [ebp - 0x1048]
inc eax
shl eax, 2
test eax, eax
jle 0x40ff92
lea edx, [ebp - 0x104c]
mov ecx, edx
mov edx, eax
mov eax, ecx
call fcn.00401398
cmp byte [ebp + 0x10], 0
je 0x40ffb0
cmp word [esi], 0x22
jne 0x40ffb0
cmp word [esi + ebx*2 - 2], 0x22
jne 0x40ffb0
mov word [esi + ebx*2 - 2], 0
add esi, 2
mov ecx, dword [ebp - 0x1048]
mov edx, dword [ebp - 0x104c]
mov eax, esi
call fcn.0040bbd0
xor ebx, ebx
cmp byte [ebp + 8], 0
je 0x410062
cmp word [esi], 0x25
jne 0x410062
mov word [ebp - 0x1c4c], 0
mov dword [ebp - 8], 1
push 0x400
lea eax, [ebp - 0x144c]
push eax
push dword [ebp - 0x104c]
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
mov ebx, eax
test ebx, ebx
je 0x410024
call fcn.0040c808
test eax, eax
je 0x410024
push 0x400
lea eax, [ebp - 0x1c4c]
push eax
push esi
call sub.KERNEL32.DLL_ExpandEnvironmentStringsW
mov dword [ebp - 8], eax
test ebx, ebx
je 0x41003f
cmp ebx, 0x400
jge 0x41003f
cmp dword [ebp - 8], 0
je 0x41003f
cmp dword [ebp - 8], 0x400
jl 0x410043
xor edx, edx
jmp 0x410048
mov edx, 1
mov ebx, edx
test bl, bl
je 0x410062
lea ecx, [ebp - 0x1c4c]
lea edx, [ebp - 0x144c]
mov eax, dword [ebp - 4]
call fcn.00401308
test bl, bl
jne 0x410076
mov ecx, esi
mov edx, dword [ebp - 0x104c]
mov eax, dword [ebp - 4]
call fcn.00401308
lea esi, [edi + 2]
jmp 0x41007e
add esi, 2
cmp word [esi], 0xd
je 0x41007b
cmp word [esi], 0xa
je 0x41007b
cmp word [esi], 0
jne 0x40feff
lea eax, [ebp - 0x104c]
mov edx, 2
call fcn.00401244
lea eax, [ebp - 0x1040]
mov edx, 2
call fcn.00401218
jmp 0x4101dd
mov esi, dword [ebp - 0x1034]
jmp 0x4101d4
mov edi, esi
xor eax, eax
jmp 0x4100e9
cmp byte [ebp + 0xc], 0
je 0x4100e8
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x4100e8
xor ecx, ecx
mov cl, byte [edi + 1]
cmp ecx, 0x2f
jne 0x4100e8
mov byte [edi], 0
mov eax, edi
inc edi
xor edx, edx
mov dl, byte [edi]
cmp edx, 0xd
je 0x410100
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0xa
je 0x410100
cmp byte [edi], 0
jne 0x4100ca
mov byte [edi], 0
test eax, eax
jne 0x410109
mov eax, edi
dec eax
cmp esi, eax
ja 0x410128
xor edx, edx
mov dl, byte [eax]
cmp edx, 0x20
je 0x410120
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 9
jne 0x410128
mov byte [eax], 0
dec eax
cmp esi, eax
jbe 0x41010e
cmp byte [esi], 0
je 0x4101bc
cmp byte [ebp + 0x10], 0
je 0x410158
xor eax, eax
mov al, byte [esi]
cmp eax, 0x22
jne 0x410158
push esi
call fcn.0043bd54
pop ecx
xor edx, edx
mov dl, byte [esi + eax - 1]
cmp edx, 0x22
jne 0x410158
mov byte [esi + eax - 1], 0
inc esi
cmp dword [ebp + 0x14], 2
jne 0x410165
push esi
push esi
call sub.USER32.DLL_OemToCharA
xor ebx, ebx
cmp byte [ebp + 8], 0
je 0x4101ae
xor eax, eax
mov al, byte [esi]
cmp eax, 0x25
jne 0x4101ae
push 0x400
lea edx, [ebp - 0x204c]
push edx
push esi
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
test eax, eax
je 0x410193
cmp eax, 0x400
jl 0x410197
xor ebx, ebx
jmp 0x41019c
mov ebx, 1
test bl, bl
je 0x4101ae
lea edx, [ebp - 0x204c]
mov eax, dword [ebp - 4]
call fcn.00401300
test bl, bl
jne 0x4101bc
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00401300
lea esi, [edi + 1]
jmp 0x4101c2
inc esi
xor eax, eax
mov al, byte [esi]
cmp eax, 0xd
je 0x4101c1
xor edx, edx
mov dl, byte [esi]
cmp edx, 0xa
je 0x4101c1
cmp byte [esi], 0
jne 0x4100c4
mov al, 1
push eax
lea eax, [ebp - 0x1034]
mov edx, 2
call fcn.00401244
lea eax, [ebp - 0x1028]
mov edx, 2
call fcn.004031f0
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14