Function at 0x49d0e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 8], 0
xor eax, eax
mov byte [ebp - 7], al
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
je 0x49d146
mov ecx, 0x52cf74
test ecx, ecx
je 0x49d146
push 0x52cf84
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCR80.dll_strcmp
add esp, 8
test eax, eax
jne 0x49d146
mov dword [ebp - 0x10], 1
jmp 0x49d1ac
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCR80.dll_strlen
add esp, 4
cmp eax, 0xe
jb 0x49d1a5
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCR80.dll_strlen
add esp, 4
mov edx, dword [ebp + 0xc]
lea eax, [edx + eax - 0xd]
test eax, eax
je 0x49d1a5
mov ecx, 0x52cf94
test ecx, ecx
je 0x49d1a5
push 0x52cfa4
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCR80.dll_strlen
add esp, 4
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax - 0xd]
push edx
call sub.MSVCR80.dll_strcmp
add esp, 8
test eax, eax
jne 0x49d1a5
mov dword [ebp - 0x10], 2
jmp 0x49d1ac
mov dword [ebp - 0x10], 3
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 1
je 0x49d27d
cmp dword [ebp - 0x20], 2
je 0x49d3f0
cmp dword [ebp - 0x20], 3
je 0x49d1d1
jmp 0x49d581
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0049bf40
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x49d1f2
mov eax, dword [ebp - 0x14]
jmp 0x49d583
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x49d210
mov eax, dword [ebp - 0x14]
jmp 0x49d583
push str.LM_BORROW
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCR80.dll_strcmp
add esp, 8
test eax, eax
jne 0x49d25d
push 0
push 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0049c580
add esp, 0x14
cmp dword [ebp - 0x14], 0
jne 0x49d25b
push 1
push 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0049c580
add esp, 0x14
jmp 0x49d275
push 0
push 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0049c580
add esp, 0x14
mov eax, dword [ebp - 0x14]
jmp 0x49d583
mov edx, dword [ebp + 8]
cmp dword [edx + 0x184], 0
je 0x49d2a8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x184]
push ecx
call fcn.00496150
add esp, 4
mov edx, dword [ebp + 8]
mov dword [edx + 0x184], 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x49d2d2
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.MSVCR80.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x49d2e0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], 0x546cb3
push 0
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0049c580
add esp, 0x14
cmp dword [ebp - 0x18], 0
je 0x49d312
mov edx, dword [ebp - 0x18]
push edx
call sub.MSVCR80.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 4], eax
jmp 0x49d320
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0x546cb4
cmp dword [ebp - 4], 0
jne 0x49d333
cmp dword [ebp - 0xc], 0
jne 0x49d333
xor eax, eax
jmp 0x49d583
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 1]
push edx
push 1
call dword [sym.imp.MSVCR80.dll_calloc]
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x184], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x184], 0
jne 0x49d365
xor eax, eax
jmp 0x49d583
push 0x3b
push 0x52cfc0
lea eax, [ebp - 8]
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x49d387
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x24], ecx
jmp 0x49d38e
mov dword [ebp - 0x24], 0x546cb5
cmp dword [ebp - 0x18], 0
je 0x49d3a2
cmp dword [ebp - 0x1c], 0
je 0x49d3a2
lea edx, [ebp - 8]
mov dword [ebp - 0x28], edx
jmp 0x49d3a9
mov dword [ebp - 0x28], 0x546cb6
cmp dword [ebp - 0x1c], 0
je 0x49d3b7
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
jmp 0x49d3be
mov dword [ebp - 0x2c], 0x546cb7
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
push 0x52cfc4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x184]
push edx
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x14
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x184]
jmp 0x49d583
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0049fc10
add esp, 4
mov edx, dword [ebp + 8]
cmp dword [edx + 0x188], 0
je 0x49d427
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x188]
push ecx
call fcn.00496150
add esp, 4
mov edx, dword [ebp + 8]
mov dword [edx + 0x188], 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x49d451
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.MSVCR80.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x49d45f
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], 0x546cb8
mov dword [ebp - 0x18], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
and eax, 4
jne 0x49d48c
push 0
push 0
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0049c580
add esp, 0x14
cmp dword [ebp - 0x18], 0
je 0x49d4a6
mov ecx, dword [ebp - 0x18]
push ecx
call sub.MSVCR80.dll_strlen
add esp, 4
add eax, 1
mov dword [ebp - 4], eax
jmp 0x49d4b4
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0x546cb9
cmp dword [ebp - 4], 0
jne 0x49d4c7
cmp dword [ebp - 0xc], 0
jne 0x49d4c7
xor eax, eax
jmp 0x49d583
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 3]
push ecx
push 1
call dword [sym.imp.MSVCR80.dll_calloc]
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x188], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x188], 0
jne 0x49d4f9
xor eax, eax
jmp 0x49d583
push 0x3b
push 0x52cfcc
lea ecx, [ebp - 8]
push ecx
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x49d51b
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x30], edx
jmp 0x49d522
mov dword [ebp - 0x30], 0x546cba
cmp dword [ebp - 0x18], 0
je 0x49d536
cmp dword [ebp - 0x1c], 0
je 0x49d536
lea eax, [ebp - 8]
mov dword [ebp - 0x34], eax
jmp 0x49d53d
mov dword [ebp - 0x34], 0x546cbb
cmp dword [ebp - 0x1c], 0
je 0x49d54b
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], ecx
jmp 0x49d552
mov dword [ebp - 0x38], 0x546cbc
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
push 0x52cfd0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x188]
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x14
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x188]
jmp 0x49d583
xor eax, eax
mov esp, ebp
pop ebp
ret