Function at 0x419180
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
lea eax, [esp + 0x28]
movzx edx, word [esp + 0x40]
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call sub.msvcrt.dll_wcslen
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x44]
mov dword [esp + 0x1c], 0
add edi, 2
mov dword [esp + 0x20], edi
lea esi, [esi]
lea edi, [edi]
movzx eax, word [edi]
mov edx, 0xffffffff
test ax, ax
je 0x419440
cmp ax, 0x5b
je 0x4197a0
cmp ax, 0x3f
je 0x419788
cmp ax, 0x2a
je 0x419788
cmp ax, 0x2b
je 0x419788
cmp ax, 0x40
je 0x419788
cmp ax, 0x21
je 0x419788
lea esi, [esi]
cmp ax, 0x29
je 0x4196f0
cmp ax, 0x7c
lea ebp, [edi + 2]
je 0x419650
mov esi, esi
lea edi, [edi]
mov ebx, dword [esp + 0x1c]
mov edi, ebp
test ebx, ebx
jns 0x4191d0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x419634
cmp word [ebp - 2], 0x29
jne 0x419618
mov edx, dword [esp + 0x24]
sub edx, 0x21
cmp edx, 0x1f
ja case.0x419271.34
jmp dword [edx*4 + 0x419278]
mov dword [esp], ebp
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call fcn.004185d0
xor edx, edx
test eax, eax
je 0x419440
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x48]
cmp esi, dword [esp + 0x4c]
ja 0x419422
mov edi, dword [esp + 0x54]
mov ebx, dword [esp + 0x54]
and edi, 1
and ebx, 0xfffffffb
lea esi, [esi]
test edi, edi
mov edx, dword [esp + 0x54]
jne 0x41935a
mov edx, ebx
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x50]
add eax, 4
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], ecx
call fcn.004185d0
test eax, eax
jne 0x41940c
test edi, edi
mov eax, dword [esp + 0x54]
jne 0x41938f
mov eax, ebx
cmp esi, dword [esp + 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
je 0x4193ac
xor edx, edx
cmp word [esi - 2], 0x2f
je 0x419461
mov eax, edx
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x4c]
mov dword [esp + 4], esi
mov dword [esp], ebp
mov dword [esp + 8], edx
call fcn.004185d0
test eax, eax
je 0x41944a
cmp esi, dword [esp + 0x48]
je 0x41940c
mov eax, dword [esp + 0x54]
test al, 1
jne 0x4193dc
mov eax, ebx
mov dword [esp + 0x10], eax
xor edx, edx
cmp word [esi - 2], 0x2f
je 0x41944e
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
sub edx, 2
mov dword [esp], edx
call fcn.004185d0
test eax, eax
je 0x41944a
add esi, 2
cmp esi, dword [esp + 0x4c]
ja 0x41941e
mov eax, dword [esp + 0x28]
jmp 0x419350
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
mov edx, 1
test eax, eax
mov dword [esp + 0x28], eax
jne case.0x419271.43
lea esi, [esi]
lea edi, [edi]
add esp, 0x2c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
xor edx, edx
jmp 0x419440
mov ecx, dword [esp + 0x54]
and ecx, 5
cmp ecx, 5
jne 0x4193e9
mov edx, 1
jmp 0x4193e9
mov ecx, dword [esp + 0x54]
and ecx, 5
cmp ecx, 5
jne 0x4193aa
mov edx, 1
jmp 0x4193aa
mov esi, dword [esp + 0x48]
cmp esi, dword [esp + 0x4c]
ja 0x41952e
mov edi, dword [esp + 0x54]
and edi, 0xfffffffb
test eax, eax
mov ebx, eax
je 0x4194d7
lea esi, [esi]
lea edi, [edi]
mov eax, dword [esp + 0x54]
test al, 1
jne 0x4194aa
mov eax, edi
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x50]
lea ecx, [ebx + 4]
mov dword [esp + 8], esi
mov eax, dword [esp + 0x48]
mov dword [esp], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
call fcn.004185d0
test eax, eax
je 0x41954b
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4194a0
mov eax, dword [esp + 0x54]
test al, 1
jne 0x4194e1
mov eax, edi
cmp esi, dword [esp + 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
je 0x4194fa
xor edx, edx
cmp word [esi - 2], 0x2f
je 0x419538
mov eax, edx
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 4], esi
mov dword [esp], ebp
mov dword [esp + 8], ecx
call fcn.004185d0
xor edx, edx
test eax, eax
je 0x419440
add esi, 2
cmp esi, dword [esp + 0x4c]
ja 0x41952e
mov eax, dword [esp + 0x28]
jmp 0x419490
mov edx, 1
jmp 0x419440
mov ebx, dword [esp + 0x54]
and ebx, 5
cmp ebx, 5
jne 0x4194f8
mov edx, 1
jmp 0x4194f8
test ebx, ebx
jne 0x41951c
jmp 0x4194d7
mov ebp, 0x417ed0
mov edx, 0xffffffff
test ebp, ebp
je 0x419440
mov dword [esp + 8], 0x493
mov dword [esp + 4], 0x417f10
mov dword [esp], 0x417f50
call sub.msvcrt.dll__assert
mov dword [esp], ebp
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
call fcn.004185d0
xor edx, edx
test eax, eax
je 0x419440
mov eax, dword [esp + 0x28]
mov dword [esp + 4], ebp
add eax, 4
mov dword [esp], eax
call sub.msvcrt.dll_wcscat
test byte [esp + 0x54], 1
mov edx, dword [esp + 0x54]
jne 0x4195d2
and edx, 0xfffffffb
mov dword [esp + 0x10], edx
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov dword [esp], eax
mov ebx, dword [esp + 0x48]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
call fcn.004185d0
xor edx, edx
test eax, eax
je 0x419440
mov edx, dword [esp + 0x28]
mov eax, dword [edx]
mov edx, 1
mov dword [esp + 0x28], eax
test eax, eax
jne case.0x419271.64
jmp 0x419440
mov dword [esp + 8], 0x438
mov dword [esp + 4], 0x417f10
mov dword [esp], 0x417f77
jmp 0x41957a
mov dword [esp + 8], 0x437
mov dword [esp + 4], 0x417f10
mov dword [esp], 0x417f87
jmp 0x41957a
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x419240
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
sub esi, 0x3f
cmp si, 1
jbe 0x41967a
mov ecx, dword [esp + 0x20]
mov ebp, edi
sub ebp, ecx
sar ebp, 1
lea edx, [ebp + 1]
test edx, edx
lea eax, [edx + edx + 4]
js 0x4196e0
cmp eax, 3
jbe 0x4196e0
cmp eax, 0x1f3f
ja 0x4196e0
mov dword [esp], eax
mov ebx, edi
add edi, 2
call sub.msvcrt.dll_malloc
mov edx, dword [esp + 0x20]
mov ebp, eax
mov eax, dword [esp + 0x20]
lea esi, [ebp + 4]
sub ebx, edx
mov ecx, ebx
mov dword [esp + 4], eax
sar ecx, 1
mov dword [esp + 8], ecx
mov dword [esp], esi
call fcn.00422920
mov word [ebx + eax], 0
mov edx, dword [esp + 0x18]
mov dword [ebp], 0
mov dword [esp + 0x18], ebp
mov dword [edx], ebp
mov ebp, edi
mov dword [esp + 0x20], edi
jmp 0x419240
mov edx, 0xffffffff
jmp 0x419440
dec dword [esp + 0x1c]
lea ebp, [edi + 2]
cmp dword [esp + 0x1c], 0xffffffff
jne 0x419240
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
sub ecx, 0x3f
cmp cx, 1
jbe 0x419720
mov eax, dword [esp + 0x20]
mov ebx, edi
sub ebx, eax
sar ebx, 1
lea edx, [ebx + 1]
test edx, edx
lea eax, [edx + edx + 4]
js 0x4196e0
cmp eax, 3
jbe 0x4196e0
cmp eax, 0x1f3f
ja 0x4196e0
mov dword [esp], eax
mov esi, edi
call sub.msvcrt.dll_malloc
mov ebx, eax
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x20]
lea edx, [ebx + 4]
mov dword [esp + 4], ebp
sub esi, eax
mov ecx, esi
mov dword [esp], edx
sar ecx, 1
mov dword [esp + 8], ecx
call fcn.00422920
mov word [esi + eax], 0
mov esi, dword [esp + 0x18]
mov dword [ebx], 0
mov dword [esp + 0x18], ebx
mov dword [esi], ebx
mov esi, esi
lea edi, [edi]
lea ebp, [edi + 2]
jmp 0x419240
cmp word [edi + 2], 0x28
jne 0x419220
inc dword [esp + 0x1c]
jmp 0x419780
mov ecx, dword [0x425390]
test ecx, ecx
je 0x419808
add edi, 2
movzx eax, word [edi]
cmp ax, 0x21
je 0x419800
mov ebp, dword [0x425390]
test ebp, ebp
js 0x4197fa
cmp ax, 0x5d
je 0x4197ec
lea esi, [esi]
lea edi, [edi]
add edi, 2
mov edx, 0xffffffff
test ax, ax
je 0x419440
movzx eax, word [edi]
cmp ax, 0x5d
jne 0x4197d0
jmp 0x419780
add edi, 2
movzx eax, word [edi]
cmp ax, 0x5d
jne 0x4197d0
jmp 0x419780
cmp ax, 0x5e
jne 0x4197c0
add edi, 2
movzx eax, word [edi]
jmp 0x4197c0
mov dword [esp], 0x417170
call sub.msvcrt.dll_getenv
test eax, eax
setne dl
movzx esi, dl
lea ebx, [esi + esi - 1]
mov dword [0x425390], ebx
jmp 0x4197aa