Function at 0x40b700
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x848
mov eax, dword [0x40d014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
and dword [ebp - 0x82c], 0
mov dword [ebp - 0x828], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x848], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 0x824], eax
xor esi, esi
mov eax, dword [ebp + 0x10]
inc esi
push edi
push ebx
push 0x401244
mov eax, dword [eax]
mov dword [ebp - 0x814], eax
lea eax, [ebp - 0x20c]
push eax
mov dword [ebp - 0x81c], esi
call fcn.0040b5e9
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x400
push 0x42d8b0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
dec eax
cmp eax, 0x3fe
ja 0x40b7e3
lea eax, [ebp - 0x82c]
push eax
push 0x40124c
push 0x42d8b0
jmp 0x40b7c9
mov ecx, 0x100
cmp esi, ecx
je 0x40b7d4
mov dword [ebp + esi*4 - 0x814], eax
lea eax, [ebp - 0x82c]
push eax
inc esi
push 0x40124c
mov dword [ebp - 0x81c], esi
push 0
call edi
add esp, 0xc
test eax, eax
jne 0x40b7a4
jmp 0x40b7ff
push ecx
push ebx
push 0x4a
push ebx
call fcn.0040a50c
jmp 0x40b8d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x40b7ff
lea eax, [ebp - 0x20c]
push eax
push 0x48
push ebx
call fcn.0040a4d2
cmp dword [ebp + 0xc], 1
jle 0x40b832
mov edx, dword [ebp + 0x10]
xor ecx, ecx
inc ecx
add edx, 4
mov eax, 0x100
cmp esi, eax
je 0x40b881
mov eax, dword [edx]
mov dword [ebp + esi*4 - 0x814], eax
inc esi
push 4
pop eax
add edx, eax
mov dword [ebp - 0x81c], esi
inc ecx
cmp ecx, dword [ebp + 0xc]
jl 0x40b80e
push ebx
lea eax, [ebp - 0x414]
push 0x401250
push eax
call fcn.0040b5e9
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x400
push 0x42e0b0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x3fe
ja 0x40b8bb
lea eax, [ebp - 0x82c]
push eax
push 0x40124c
push 0x42e0b0
jmp 0x40b8b0
push eax
jmp 0x40b7d5
mov ecx, 0x100
cmp esi, ecx
je 0x40b7d4
mov dword [ebp + esi*4 - 0x814], eax
lea eax, [ebp - 0x82c]
push eax
inc esi
push 0x40124c
mov dword [ebp - 0x81c], esi
push 0
call edi
add esp, 0xc
test eax, eax
jne 0x40b887
jmp 0x40b8d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x40b8d7
lea eax, [ebp - 0x414]
push eax
push 0x48
push ebx
call fcn.0040a4d2
mov ecx, dword [ebp - 0x828]
mov eax, ecx
push 0x14
pop edi
cmp dword [ecx], 5
je 0x40b8ee
add eax, edi
cmp dword [eax], 5
jne 0x40b8e7
sub eax, ecx
cdq
idiv edi
push eax
mov dword [ebp - 0x830], eax
call fcn.0040c09b
mov edi, eax
xor ecx, ecx
push 4
pop edx
mov eax, esi
mov dword [ebp - 0x834], edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040c09b
mov dword [ebp - 0x83c], eax
pop ecx
pop ecx
test edi, edi
je 0x40b92d
test eax, eax
jne 0x40b93e
push 0xbf
push 0x401260
push 2
call fcn.0040a1c6
mov ecx, dword [ebp - 0x824]
xor eax, eax
and dword [ecx], 0
cmp dword [ebp - 0x830], eax
jbe 0x40b981
mov ecx, dword [ebp - 0x828]
mov esi, dword [ebp - 0x830]
add ecx, 0x10
mov byte [eax + edi], 0
mov edx, dword [ecx]
test edx, edx
je 0x40b96d
mov byte [edx], 0
inc eax
add ecx, 0x14
cmp eax, esi
jb 0x40b960
mov esi, dword [ebp - 0x81c]
mov ecx, dword [ebp - 0x824]
xor edi, edi
mov byte [ebp - 0x815], 1
inc edi
mov byte [ebp - 0x816], 0
cmp esi, edi
jle 0x40bbaf
mov dword [ebp - 0x840], 0x2d
mov dword [ebp - 0x844], 0x2f
mov edx, dword [ebp + edi*4 - 0x814]
mov dword [ebp - 0x838], edx
movzx eax, word [edx]
cmp ax, word [ebp - 0x840]
je 0x40b9e8
cmp ax, word [ebp - 0x844]
je 0x40b9e8
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x83c]
mov dword [ecx + eax*4], edx
mov ecx, dword [ebp - 0x824]
inc dword [ecx]
jmp 0x40bb93
mov ecx, 0x40120c
mov eax, edx
mov si, word [eax]
cmp si, word [ecx]
mov esi, dword [ebp - 0x81c]
jne 0x40ba2e
cmp word [eax], 0
je 0x40ba2a
mov si, word [eax + 2]
cmp si, word [ecx + 2]
mov word [ebp - 0x81e], si
mov esi, dword [ebp - 0x81c]
jne 0x40ba2e
add eax, 4
add ecx, 4
cmp word [ebp - 0x81e], 0
jne 0x40b9ef
xor eax, eax
jmp 0x40ba33
sbb eax, eax
or eax, 1
test eax, eax
je 0x40bb8d
mov ecx, 0x40121c
mov eax, edx
mov si, word [eax]
cmp si, word [ecx]
mov esi, dword [ebp - 0x81c]
jne 0x40ba81
cmp word [eax], 0
je 0x40ba7d
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
mov word [ebp - 0x81e], dx
mov edx, dword [ebp - 0x838]
jne 0x40ba81
add eax, 4
add ecx, 4
cmp word [ebp - 0x81e], 0
jne 0x40ba42
xor eax, eax
jmp 0x40ba86
sbb eax, eax
or eax, 1
test eax, eax
je 0x40bb8d
lea eax, [edx + 2]
push eax
push dword [ebp - 0x828]
call fcn.0040bc31
mov esi, eax
inc edi
test esi, esi
jne 0x40babf
push dword [ebp - 0x838]
push 0x3f
push ebx
call fcn.0040a225
xor al, al
mov byte [ebp - 0x815], al
jmp 0x40bb7f
mov eax, esi
sub eax, dword [ebp - 0x828]
push 0x14
pop ecx
cdq
idiv ecx
mov ecx, dword [ebp - 0x834]
mov dword [ebp - 0x838], eax
cmp byte [eax + ecx], 0
je 0x40baee
push dword [ebp + edi*4 - 0x818]
push 0x43
push ebx
call fcn.0040a4d2
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40baf8
mov byte [eax], 1
cmp dword [esi], 0
je 0x40bb22
cmp dword [esi], 1
jne 0x40bb0b
mov byte [ebp - 0x816], 1
jmp 0x40bb22
mov eax, dword [0x42d8a8]
test eax, eax
je 0x40bb1d
push eax
push esi
call fcn.0040b6af
jmp 0x40bb54
cmp dword [esi], 3
jne 0x40bb2a
mov eax, dword [esi + 0xc]
mov byte [eax], 1
jmp 0x40bb54
cmp edi, dword [ebp - 0x81c]
je 0x40bb5c
mov ecx, dword [ebp + edi*4 - 0x814]
push 0x2d
pop edx
movzx eax, word [ecx]
cmp ax, dx
je 0x40bb5c
push 0x2f
pop edx
cmp ax, dx
je 0x40bb5c
push ecx
push esi
call fcn.0040b6af
inc edi
mov al, byte [ebp - 0x815]
jmp 0x40bb6f
push dword [esi + 4]
push 0x3d
push ebx
call fcn.0040a225
xor al, al
mov byte [ebp - 0x815], al
mov ecx, dword [ebp - 0x838]
mov edx, dword [ebp - 0x834]
mov byte [ecx + edx], 1
mov esi, dword [ebp - 0x81c]
mov ecx, dword [ebp - 0x824]
jmp 0x40bb9a
mov ecx, dword [ebp - 0x824]
mov al, byte [ebp - 0x815]
inc edi
cmp edi, esi
jl 0x40b9ae
cmp byte [ebp - 0x816], 0
jne 0x40bc00
test al, al
je 0x40bc00
mov ecx, dword [ebp - 0x830]
xor edi, edi
test ecx, ecx
je 0x40bc00
mov esi, dword [ebp - 0x828]
push 0x14
add esi, 4
pop eax
cmp dword [esi - 4], 0
je 0x40bbf9
cmp byte [esi + 4], 0
je 0x40bbf9
mov eax, dword [ebp - 0x834]
cmp byte [edi + eax], 0
jne 0x40bbf6
push dword [esi]
push 0x3e
push ebx
call fcn.0040a225
mov ecx, dword [ebp - 0x830]
mov byte [ebp - 0x815], 0
push 0x14
pop eax
inc edi
add esi, eax
cmp edi, ecx
jb 0x40bbc7
push dword [ebp - 0x834]
call fcn.0040c0a4
mov eax, dword [ebp - 0x83c]
pop ecx
mov ecx, dword [ebp - 0x848]
pop edi
pop esi
pop ebx
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x815]
xor ecx, ebp
call fcn.004093e3
leave
ret 0x18