Function at 0x403160
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4072d3
mov eax, dword fs:[0]
push eax
sub esp, 0x2f4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 7
push str.Desktop
call fcn.00405bdc
mov edx, eax
lea ecx, [ebp - 0x2c8]
call fcn.004018e0
push str.USERPROFILE
mov dword [ebp - 4], 0
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, eax
add esp, 0xc
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4031c3
sub ecx, esi
push ecx
push edx
call fcn.00405bdc
mov edx, eax
lea ecx, [ebp - 0x2b0]
call fcn.004018e0
lea eax, [ebp - 0x2c8]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x2b0]
lea ecx, [ebp - 0x40]
call fcn.00401eb0
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x29c]
cmp ecx, 7
jbe 0x40323c
mov edx, dword [ebp - 0x2b0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403232
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40328f
push ecx
push edx
call fcn.00405ff3
add esp, 8
xor eax, eax
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 7
mov word [ebp - 0x2b0], ax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x2b4]
cmp ecx, 7
jbe 0x40329f
mov edx, dword [ebp - 0x2c8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403295
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x403295
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00405ff3
add esp, 8
xor eax, eax
mov dword [ebp - 0x294], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
push ecx
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x20]
call fcn.00404990
add esp, 4
test eax, eax
jne 0x40354a
mov ebx, dword [ebp - 0x1c]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
test ebx, ebx
je 0x4032db
lock inc dword [ebx + 4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x4032ec
lock inc dword [ebx + 4]
movlpd qword [ebp - 0x28], xmm0
or esi, 0xffffffff
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
test ebx, ebx
je 0x403325
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x403325
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
mov eax, esi
lock xadd dword [ebx + 8], eax
jne 0x403325
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov byte [ebp - 4], 8
nop dword [eax]
test edi, edi
je 0x4034a1
lea eax, [ebp - 0x2c0]
mov edx, 3
lea esi, [edi + 0x20]
push eax
mov ecx, esi
call fcn.00402fd0
add esp, 4
movq xmm0, qword [eax]
mov edx, dword [eax + 8]
movq qword [ebp - 0x2d4], xmm0
mov eax, dword [ebp - 0x2d4]
test edx, edx
je 0x403378
cmp eax, 1
je 0x403378
cmp eax, 9
jne 0x403561
cmp eax, 2
je 0x403405
lea eax, [ebp - 0x2a8]
mov edx, 3
push eax
mov ecx, esi
call fcn.00402fd0
add esp, 4
movq xmm0, qword [eax]
mov edx, dword [eax + 8]
movq qword [ebp - 0x2e0], xmm0
mov eax, dword [ebp - 0x2e0]
test edx, edx
je 0x4033be
cmp eax, 1
je 0x4033be
cmp eax, 9
jne 0x403561
cmp eax, 3
je 0x403405
lea eax, [ebp - 0x300]
mov edx, 6
push eax
mov ecx, esi
call fcn.00402fd0
add esp, 4
movq xmm0, qword [eax]
mov edx, dword [eax + 8]
movq qword [ebp - 0x2ec], xmm0
mov eax, dword [ebp - 0x2ec]
test edx, edx
je 0x403400
cmp eax, 1
je 0x403400
cmp eax, 9
jne 0x40356c
cmp eax, 4
jne 0x403410
inc dword [ebp - 0x294]
nop dword [eax + eax]
lea eax, [ebp - 0x290]
push eax
push dword [edi + 0x38]
call fcn.00405c9d
cmp eax, 0x12
je 0x403462
test eax, eax
jne 0x40355a
cmp word [ebp - 0x264], 0x2e
jne 0x403452
mov ax, word [ebp - 0x262]
test ax, ax
je 0x403410
cmp ax, 0x2e
jne 0x403452
cmp word [ebp - 0x260], 0
je 0x403410
lea eax, [ebp - 0x290]
mov ecx, edi
push eax
call fcn.00402da0
jmp 0x403492
mov esi, dword [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
test esi, esi
je 0x403492
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x403492
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x403492
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
xor eax, eax
test eax, eax
jne 0x40355a
jmp 0x403330
mov esi, dword [ebp - 0x14]
or edi, 0xffffffff
test esi, esi
je 0x4034ca
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x4034ca
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x4034ca
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
test ebx, ebx
je 0x4034ec
mov eax, edi
lock xadd dword [ebx + 4], eax
jne 0x4034ec
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [ebx + 8], edi
dec edi
jne 0x4034ec
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [ebp - 0x2c]
cmp ecx, 7
jbe 0x403528
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40351e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40351e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00405ff3
add esp, 8
mov eax, dword [ebp - 0x294]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405fb5
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x40]
mov edx, eax
push ecx
mov ecx, str.directory_iterator::directory_iterator
call fcn.00402b10
mov edx, eax
call fcn.004029d0
push esi
mov ecx, str.status
call fcn.00402b10
push esi
mov ecx, str.symlink_status
call fcn.00402b10
int3