Function at 0x4b76f0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x7c
mov ebx, dword [esp + 0x9c]
call sub.msvcrt.dll__errno
xor ecx, ecx
and dword [esp + 0x90], 0x6000
mov eax, dword [eax]
mov dword [esp], 0x558cd9
mov dword [esp + 0x4c], 0xffffffff
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x54], 0xfffffffd
mov word [esp + 0x58], cx
mov dword [esp + 0x5c], 0
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x90]
mov word [esp + 0x60], si
mov dword [esp + 0x64], 0
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x68], eax
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4b778b
movsx edx, byte [eax]
mov eax, 2
sub edx, 0x30
cmp edx, 2
jbe 0x4b7798
call fcn.004bdb30
and eax, 1
neg eax
add eax, 3
mov dword [esp + 0x6c], eax
lea esi, [esi]
movsx eax, byte [ebx]
lea ebp, [ebx + 1]
mov edi, ebp
test eax, eax
je 0x4b7840
cmp eax, 0x25
jne 0x4b7850
mov eax, dword [esp + 0x90]
xor ecx, ecx
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x4c], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0x48], eax
movzx edx, byte [ebx + 1]
lea eax, [esp + 0x4c]
mov dword [esp + 0x14], eax
test dl, dl
je 0x4b7827
lea eax, [edx - 0x20]
movsx esi, dl
cmp al, 0x5a
lea ebx, [edi + 1]
ja case.0x4b7802.1
movzx eax, al
jmp dword [eax*4 + 0x558cf0]
movzx edx, byte [edi + 1]
mov ecx, 4
mov edi, ebx
mov dword [esp + 0x10], 0
test dl, dl
jne 0x4b77ee
mov ebx, edi
movsx eax, byte [ebx]
lea ebp, [ebx + 1]
mov edi, ebp
test eax, eax
jne 0x4b77b0
lea esi, [esi]
mov eax, dword [esp + 0x64]
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [esp + 0x44]
mov ebx, ebp
call fcn.004b61c0
jmp 0x4b77a0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xa0]
sub edx, 2
cmp edx, 1
jbe case.0x4b7802.51
mov esi, dword [eax]
add dword [esp + 0xa0], 4
test esi, esi
je 0x4b7be6
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov edx, eax
lea ecx, [esp + 0x44]
mov eax, esi
call fcn.004b6310
jmp 0x4b77a0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x50], 0xffffffff
sub edx, 2
cmp edx, 1
jbe 0x4b7cae
mov eax, dword [eax]
lea ecx, [esp + 0x44]
mov edx, 1
add dword [esp + 0xa0], 4
mov byte [esp + 0x30], al
lea eax, [esp + 0x30]
call fcn.004b6310
jmp 0x4b77a0
mov eax, dword [esp + 0x48]
or eax, 0x20
test al, 4
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xa0]
je 0x4b7cf3
fld xword [eax]
lea esi, [eax + 0xc]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b71e0
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov eax, dword [esp + 0x48]
or eax, 0x20
test al, 4
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xa0]
je 0x4b7c89
fld xword [eax]
lea esi, [eax + 0xc]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b6c80
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
or dword [esp + 0x48], 0x80
cmp dword [esp + 0x10], 3
mov eax, dword [esp + 0xa0]
je 0x4b7f8f
cmp dword [esp + 0x10], 2
je 0x4b804c
lea ecx, [eax + 4]
mov eax, dword [eax]
cdq
cmp dword [esp + 0x10], 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
je 0x4b80bb
cmp dword [esp + 0x10], 5
mov dword [esp + 0xa0], ecx
je 0x4b8105
mov ecx, edx
sar ecx, 0x1f
mov dword [esp + 0x38], ecx
sar ecx, 0x1f
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x44]
call fcn.004b68f0
jmp 0x4b77a0
cmp dword [esp + 0x10], 3
mov eax, dword [esp + 0xa0]
je 0x4b7fb2
cmp dword [esp + 0x10], 2
je 0x4b806d
lea ecx, [eax + 4]
mov eax, dword [eax]
xor edx, edx
cmp dword [esp + 0x10], 1
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], eax
je 0x4b80d5
cmp dword [esp + 0x10], 5
mov dword [esp + 0xa0], ecx
je 0x4b8136
cmp esi, 0x75
lea ecx, [esp + 0x44]
je 0x4b79bb
mov dword [esp], ecx
mov ecx, edx
mov edx, eax
mov eax, esi
call fcn.004b6eb0
jmp 0x4b77a0
or dword [esp + 0x48], 4
mov ecx, 4
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
movzx edx, byte [edi + 1]
cmp dl, 0x36
je 0x4b7f51
cmp dl, 0x33
je 0x4b8009
mov dword [esp + 0x10], 0
mov ecx, 4
mov edi, ebx
jmp 0x4b7823
test ecx, ecx
jne 0x4b7a85
mov eax, dword [esp + 0x90]
cmp dword [esp + 0x48], eax
je 0x4b808f
mov eax, dword [esp + 0xa0]
xor edx, edx
mov ecx, edx
lea esi, [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x30], eax
mov edx, eax
lea eax, [esp + 0x44]
mov dword [esp], eax
mov eax, 0x78
call fcn.004b6eb0
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
cmp dword [esp + 0x10], 5
mov eax, dword [esp + 0xa0]
je 0x4b7f33
cmp dword [esp + 0x10], 1
mov eax, dword [eax]
mov edx, dword [esp + 0x64]
je 0x4b8033
cmp dword [esp + 0x10], 2
je 0x4b80a3
cmp dword [esp + 0x10], 3
mov dword [eax], edx
je 0x4b8118
mov eax, dword [esp + 0xa0]
add eax, 4
mov dword [esp + 0xa0], eax
jmp 0x4b77a0
movzx edx, byte [edi + 1]
mov ecx, 4
mov edi, ebx
mov dword [esp + 0x10], 3
jmp 0x4b7823
movzx edx, byte [edi + 1]
cmp dl, 0x68
je 0x4b7f18
mov dword [esp + 0x10], 1
mov ecx, 4
mov edi, ebx
jmp 0x4b7823
mov eax, dword [esp + 0x48]
or eax, 0x20
test al, 4
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xa0]
je 0x4b7c29
fld xword [eax]
lea esi, [eax + 0xc]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b6d30
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov eax, dword [esp + 0x48]
or eax, 0x20
test al, 4
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xa0]
je 0x4b7c59
fld xword [eax]
lea esi, [eax + 0xc]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b6810
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
test eax, eax
mov esi, eax
jne 0x4b7889
mov edx, 6
mov esi, 0x558cd2
jmp 0x4b7893
movzx edx, byte [edi + 1]
cmp dl, 0x6c
je 0x4b7f74
mov dword [esp + 0x10], 2
mov ecx, 4
mov edi, ebx
jmp 0x4b7823
mov eax, dword [esp + 0x48]
test al, 4
mov eax, dword [esp + 0xa0]
jne 0x4b7b7b
fld qword [eax]
lea esi, [eax + 8]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b6d30
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov eax, dword [esp + 0x48]
test al, 4
mov eax, dword [esp + 0xa0]
jne 0x4b7bb2
fld qword [eax]
lea esi, [eax + 8]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b6810
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov eax, dword [esp + 0x48]
test al, 4
mov eax, dword [esp + 0xa0]
jne 0x4b793a
fld qword [eax]
lea esi, [eax + 8]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b6c80
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov dword [esp + 0x50], 0xffffffff
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x44]
mov edx, 1
lea esi, [eax + 4]
mov eax, dword [eax]
mov word [esp + 0x30], ax
lea eax, [esp + 0x30]
call fcn.004b6220
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
mov eax, dword [esp + 0x48]
test al, 4
mov eax, dword [esp + 0xa0]
jne 0x4b7901
fld qword [eax]
lea esi, [eax + 8]
fstp xword [esp]
lea eax, [esp + 0x44]
call fcn.004b71e0
mov dword [esp + 0xa0], esi
jmp 0x4b77a0
test ecx, ecx
je 0x4b7ee8
cmp ecx, 4
je 0x4b8187
sub edx, 0x30
cmp dl, 9
ja 0x4b8187
test ecx, ecx
jne 0x4b7ed8
mov ecx, 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4b7d5d
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
test eax, eax
js 0x4b7ff5
lea eax, [eax + eax*4]
lea eax, [esi + eax*2 - 0x30]
mov esi, dword [esp + 0x14]
mov dword [esi], eax
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
cmp ecx, 1
jbe 0x4b7fd5
movzx edx, byte [edi + 1]
mov ecx, 4
mov edi, ebx
jmp 0x4b7823
test ecx, ecx
jne 0x4b7d5d
or dword [esp + 0x48], 0x400
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
test ecx, ecx
jne 0x4b7d5d
or dword [esp + 0x48], 0x100
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
test ecx, ecx
jne 0x4b7d5d
or dword [esp + 0x48], 0x800
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
test ecx, ecx
jne 0x4b7d5d
or dword [esp + 0x48], 0x40
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
test ecx, ecx
jne 0x4b7d5d
mov dword [esp + 0x1c], ecx
lea esi, [esp + 0x30]
or dword [esp + 0x48], 0x1000
mov dword [esp + 0x30], 0
call sub.msvcrt.dll_localeconv
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x10
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
lea eax, [esp + 0x2e]
mov dword [esp], eax
call fcn.004aded0
mov ecx, dword [esp + 0x1c]
test eax, eax
jle 0x4b7e36
movzx edx, word [esp + 0x2e]
mov word [esp + 0x60], dx
mov dword [esp + 0x5c], eax
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
lea edx, [esp + 0x44]
mov eax, esi
call fcn.004b61c0
jmp 0x4b77a0
mov edx, dword [esp + 0x14]
test edx, edx
je 0x4b7d71
test ecx, 0xfffffffd
jne 0x4b7f00
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0x14]
lea esi, [eax + 4]
mov eax, dword [eax]
test eax, eax
mov dword [edx], eax
js 0x4b80f0
movzx edx, byte [edi + 1]
mov edi, ebx
mov dword [esp + 0xa0], esi
mov dword [esp + 0x14], 0
jmp 0x4b7823
mov eax, dword [esp + 0xa0]
mov esi, dword [eax]
lea edi, [eax + 4]
mov eax, 0x558cc4
test esi, esi
cmove esi, eax
mov dword [esp], esi
call sub.msvcrt.dll_wcslen
lea ecx, [esp + 0x44]
mov edx, eax
mov eax, esi
call fcn.004b6220
mov dword [esp + 0xa0], edi
jmp 0x4b77a0
cmp ecx, 2
mov eax, 3
cmove ecx, eax
jmp 0x4b7d3a
or dword [esp + 0x48], 0x200
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
movzx edx, byte [edi + 1]
mov ecx, 4
mov edi, ebx
mov dword [esp + 0x14], 0
jmp 0x4b7823
lea ebx, [edi + 2]
movzx edx, byte [edi + 2]
mov ecx, 4
mov dword [esp + 0x10], 5
mov edi, ebx
jmp 0x4b7823
mov edx, dword [eax]
mov eax, dword [esp + 0x64]
mov byte [edx], al
mov eax, dword [esp + 0xa0]
add eax, 4
mov dword [esp + 0xa0], eax
jmp 0x4b77a0
cmp byte [edi + 2], 0x34
je 0x4b814a
mov edx, 0x36
mov ecx, 4
mov dword [esp + 0x10], 0
mov edi, ebx
jmp 0x4b7823
lea ebx, [edi + 2]
movzx edx, byte [edi + 2]
mov ecx, 4
mov dword [esp + 0x10], 3
mov edi, ebx
jmp 0x4b7823
mov esi, dword [esp + 0xa0]
mov edx, dword [eax + 4]
mov eax, dword [eax]
add esi, 8
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0xa0], esi
jmp 0x4b79a7
mov ecx, dword [esp + 0xa0]
mov edx, dword [eax + 4]
mov eax, dword [eax]
add ecx, 8
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0xa0], ecx
jmp 0x4b7a0e
lea eax, [esp + 0x50]
mov ecx, 2
mov dword [esp + 0x50], 0
movzx edx, byte [edi + 1]
mov edi, ebx
mov dword [esp + 0x14], eax
jmp 0x4b7823
mov eax, dword [esp + 0x14]
sub esi, 0x30
mov dword [eax], esi
movzx edx, byte [edi + 1]
mov edi, ebx
jmp 0x4b7823
cmp byte [edi + 2], 0x32
mov edx, 0x33
jne 0x4b7a5b
lea ebx, [edi + 3]
movzx edx, byte [edi + 3]
mov ecx, 4
mov dword [esp + 0x10], 2
mov edi, ebx
jmp 0x4b7823
mov word [eax], dx
mov eax, dword [esp + 0xa0]
add eax, 4
mov dword [esp + 0xa0], eax
jmp 0x4b77a0
mov eax, dword [eax]
mov esi, dword [esp + 0xa0]
cdq
add esi, 4
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
mov dword [esp + 0xa0], esi
jmp 0x4b79a7
mov ecx, dword [esp + 0xa0]
xor edx, edx
mov eax, dword [eax]
mov dword [esp + 0x34], edx
add ecx, 4
mov dword [esp + 0x30], eax
mov dword [esp + 0xa0], ecx
jmp 0x4b7a0e
or ah, 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], 8
jmp 0x4b7a85
mov dword [eax], edx
mov eax, dword [esp + 0xa0]
add eax, 4
mov dword [esp + 0xa0], eax
jmp 0x4b77a0
movsx eax, word [esp + 0x30]
mov dword [esp + 0xa0], ecx
cdq
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
jmp 0x4b79a7
movzx eax, word [esp + 0x30]
xor edx, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x30], eax
jmp 0x4b7a0e
test ecx, ecx
jne 0x4b8165
or dword [esp + 0x48], 0x400
neg dword [esp + 0x4c]
jmp 0x4b7e87
movsx eax, byte [esp + 0x30]
cdq
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
jmp 0x4b79a7
mov esi, edx
sar esi, 0x1f
mov dword [eax + 4], esi
mov eax, dword [esp + 0xa0]
add eax, 4
mov dword [esp + 0xa0], eax
jmp 0x4b77a0
movzx eax, byte [esp + 0x30]
xor edx, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], eax
jmp 0x4b7a0e
lea ebx, [edi + 3]
movzx edx, byte [edi + 3]
mov ecx, 4
mov dword [esp + 0x10], 3
mov edi, ebx
jmp 0x4b7823
mov dword [esp + 0x50], 0xffffffff
movzx edx, byte [edi + 1]
mov edi, ebx
mov dword [esp + 0xa0], esi
mov dword [esp + 0x14], 0
jmp 0x4b7823
lea edx, [esp + 0x44]
mov eax, 0x25
mov ebx, ebp
call fcn.004b61c0
jmp 0x4b77a0