Function at 0x401690
Capabilities:
Get file attributes
Query environment variable

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f27b
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x858
mov eax, dword [0x58a710]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 0x10]
xor edi, edi
mov esi, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x84c], eax
xor eax, eax
mov dword [ebp - 0x844], esi
mov dword [ebp - 0x838], edi
mov dword [ebp - 0x85c], edi
mov dword [ebp - 0x858], edi
mov dword [ebp - 0x840], eax
mov dword [ebp - 0x854], eax
mov dword [ebp - 4], eax
test esi, esi
je 0x401b26
test ecx, ecx
mov eax, 0x54a800
cmovne eax, ecx
mov ecx, esi
mov dword [ebp - 0x83c], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401728
xor eax, eax
sub ecx, edx
mov dword [ebp - 0x828], eax
xor edx, edx
mov eax, dword [ebp - 0x844]
mov dword [ebp - 0x848], ecx
mov dword [ebp - 0x830], edx
cmp byte [eax], dl
je 0x401969
xor ecx, ecx
inc eax
mov dword [ebp - 0x834], ecx
mov dword [ebp - 0x840], eax
cmp byte [esi], 0x22
jne 0x4017b1
mov byte [esi], 0
test edx, edx
je 0x40177c
mov dword [ebp - 0x830], 0
jmp 0x4017b1
mov eax, dword [ebp - 0x840]
add eax, ecx
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x828], eax
lea eax, [ecx + 1]
mov dword [ebp - 0x838], eax
lea ecx, [ebp - 0x85c]
lea eax, [ebp - 0x838]
push eax
call fcn.00401b50
mov edi, dword [ebp - 0x85c]
movsx eax, byte [esi]
push eax
push dword [ebp - 0x83c]
call fcn.0051c7d0
add esp, 8
test eax, eax
je 0x401901
cmp dword [ebp - 0x830], 0
jne 0x401901
mov ecx, dword [ebp - 0x828]
test ecx, ecx
je 0x4018f2
cmp dword [ebx + 0x14], 0
je 0x4018f2
mov eax, dword [ebp - 0x858]
sub eax, edi
sar eax, 2
cmp eax, 1
ja 0x4018f2
mov al, byte [esi]
push 0x2525
push ecx
mov byte [ebp - 0x829], al
mov dword [ebp - 0x824], ecx
mov byte [esi], 0
call fcn.0051c7d0
add esp, 8
test eax, eax
je 0x401859
push 0x400
lea eax, [ebp - 0x820]
push eax
mov eax, dword [ebp - 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
lea ecx, [ebp - 0x820]
cmove ecx, dword [ebp - 0x824]
mov eax, ecx
mov dword [ebp - 0x824], eax
jmp 0x40185f
mov eax, dword [ebp - 0x824]
push 0x400
lea ecx, [ebp - 0x420]
push ecx
push eax
call fcn.00404270
add esp, 0xc
test eax, eax
jns 0x4018d7
push 0x2e
push dword [ebp - 0x824]
call fcn.0051c900
add esp, 8
test eax, eax
je 0x40189e
push str..exe
push eax
call fcn.00531202
add esp, 8
test eax, eax
je 0x4018d7
push dword [ebp - 0x824]
lea eax, [ebp - 0x420]
push str._s.exe
push 0x400
push eax
call fcn.00401c20
lea eax, [ebp - 0x420]
mov byte [ebp - 0x21], 0
push 0x400
push eax
push eax
call fcn.00404270
add esp, 0x1c
test eax, eax
js 0x4018e8
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x4018f5
mov al, byte [ebp - 0x829]
mov byte [esi], al
jmp 0x401934
mov byte [esi], 0
mov dword [ebp - 0x828], 0
jmp 0x401934
cmp dword [ebp - 0x828], 0
jne 0x401934
mov eax, dword [ebp - 0x834]
lea ecx, [ebp - 0x85c]
mov dword [ebp - 0x838], eax
lea eax, [ebp - 0x838]
push eax
mov dword [ebp - 0x828], esi
call fcn.00401b50
mov edi, dword [ebp - 0x85c]
mov ecx, dword [ebp - 0x834]
inc esi
mov edx, dword [ebp - 0x830]
inc ecx
mov dword [ebp - 0x834], ecx
cmp byte [esi], 0
jne 0x401764
mov eax, dword [ebp - 0x854]
mov ecx, dword [ebp - 0x848]
mov dword [ebp - 0x838], edi
mov dword [ebp - 0x840], eax
mov esi, dword [ebp - 0x858]
sub esi, edi
sar esi, 2
mov dword [ebp - 0x830], esi
test esi, esi
je 0x401ab4
cmp dword [ebp - 0x84c], 0
je 0x401ab4
lea eax, [ecx + 1]
lea eax, [eax + esi*4]
push eax
call fcn.00524eb3
add esp, 4
mov dword [ebp - 0x824], eax
test eax, eax
je 0x401ab4
mov ecx, dword [ebp - 0x848]
lea eax, [eax + esi*4]
inc ecx
movd xmm0, eax
push ecx
push dword [ebp - 0x844]
pshufd xmm0, xmm0, 0
push eax
mov dword [ebp - 0x828], eax
movaps xmmword [ebp - 0x860], xmm0
call fcn.0051ce80
add esp, 0xc
xor edx, edx
test esi, esi
jle 0x401aa6
mov ecx, dword [ebp - 0x824]
cmp esi, 8
jb 0x401a6d
lea eax, [esi - 1]
lea eax, [edi + eax*4]
cmp ecx, eax
ja 0x401a05
lea eax, [ecx - 4]
lea eax, [eax + esi*4]
cmp eax, edi
jae 0x401a6d
mov eax, esi
and eax, 0x80000007
jns 0x401a13
dec eax
or eax, 0xfffffff8
inc eax
movaps xmm1, xmmword [ebp - 0x860]
mov dword [ebp - 0x834], esi
mov esi, edi
sub dword [ebp - 0x834], eax
sub esi, ecx
mov dword [ebp - 0x83c], esi
lea eax, [ecx + 0x10]
mov esi, dword [ebp - 0x830]
mov ecx, dword [ebp - 0x83c]
nop
movups xmm0, xmmword [edi + edx*4]
add edx, 8
lea eax, [eax + 0x20]
paddd xmm0, xmm1
movups xmmword [eax - 0x30], xmm0
movups xmm0, xmmword [eax + ecx - 0x20]
paddd xmm0, xmm1
movups xmmword [eax - 0x20], xmm0
cmp edx, dword [ebp - 0x834]
jl 0x401a40
mov ecx, dword [ebp - 0x824]
cmp edx, esi
jge 0x401aa6
sub edi, dword [ebp - 0x824]
lea ecx, [ecx + edx*4]
mov dword [ebp - 0x83c], edi
mov edi, esi
mov esi, dword [ebp - 0x83c]
sub edi, edx
mov edx, dword [ebp - 0x828]
mov eax, dword [ecx + esi]
lea ecx, [ecx + 4]
add eax, edx
mov dword [ecx - 4], eax
sub edi, 1
jne 0x401a90
mov esi, dword [ebp - 0x830]
mov ecx, dword [ebp - 0x84c]
mov eax, dword [ebp - 0x824]
mov dword [ecx], eax
push dword [ebp - 0x844]
call fcn.00524eae
mov ecx, dword [ebp - 0x838]
add esp, 4
test ecx, ecx
je 0x401b24
mov eax, dword [ebp - 0x840]
sub eax, ecx
sar eax, 2
cmp eax, 0x3fffffff
jbe 0x401ae3
call fcn.00520ddb
shl eax, 2
cmp eax, 0x1000
jb 0x401b1b
test cl, 0x1f
je 0x401af7
call fcn.00520ddb
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x401b03
call fcn.00520ddb
sub ecx, eax
cmp ecx, 4
jae 0x401b0f
call fcn.00520ddb
cmp ecx, 0x23
jbe 0x401b19
call fcn.00520ddb
mov ecx, eax
push ecx
call fcn.0051939b
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005193a0
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret