Function at 0x419220
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4630a7
mov eax, dword fs:[0]
push eax
mov eax, 0x2cfc
call fcn.0045db90
mov eax, dword [0x4920c0]
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
mov byte [ebp - 0x2ce9], cl
cmp dword [0x495e10], 8
mov eax, 0x495dfc
cmovae eax, dword [0x495dfc]
xor ecx, ecx
mov dword [0x495e0c], 0
mov word [eax], cx
cmp dword [0x495e28], 8
mov eax, 0x495e14
cmovae eax, dword [0x495e14]
mov dword [0x495e24], ecx
mov word [eax], cx
cmp dword [0x495e40], 8
mov eax, 0x495e2c
cmovae eax, dword [0x495e2c]
mov dword [0x495e3c], ecx
mov word [eax], cx
mov eax, dword [0x495b38]
xorps xmm0, xmm0
mov dword [0x495e44], ecx
movlpd qword [0x496100], xmm0
cmp eax, 6
jg 0x4192e0
jne 0x419f4a
cmp dword [0x495b3c], 1
jl 0x419f4a
xor eax, eax
mov dword [ebp - 0x2a64], 7
mov dword [ebp - 0x2a68], ecx
mov word [ebp - 0x2a78], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x2a34], 7
mov dword [ebp - 0x2a38], eax
mov word [ebp - 0x2a48], ax
mov dword [ebp - 0x2a4c], 7
mov dword [ebp - 0x2a50], eax
mov word [ebp - 0x2a60], ax
mov dword [ebp - 0x2a7c], 7
mov dword [ebp - 0x2a80], eax
mov word [ebp - 0x2a90], ax
mov dword [ebp - 0x2a1c], 7
mov dword [ebp - 0x2a20], eax
mov word [ebp - 0x2a30], ax
push eax
mov dl, 1
mov ecx, str.bcdedit__enum_all
mov byte [ebp - 4], 4
call fcn.00439830
mov ecx, dword [0x496ca4]
mov esi, dword [0x496ca0]
xor eax, eax
mov word [ebp - 0x1010], ax
lea edi, [eax + 1]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add esp, 4
cmp eax, edi
jle 0x419470
mov ebx, 0x18
cmp dword [ebx + esi + 0x14], 8
lea eax, [ebx + esi]
jb 0x4193b0
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1010]
push 0x800
push eax
call fcn.004513ee
mov eax, dword [0x496ca0]
add eax, 0xffffffe8
add eax, ebx
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x4193d7
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x2a18]
push 0x800
push eax
call fcn.004513ee
lea ecx, [ebp - 0x1010]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4193f5
sub ecx, edx
sar ecx, 1
cmp ecx, 0x19
jb 0x41943d
push 3
lea eax, [ebp - 0x2a18]
push 0x473884
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
jne 0x41943d
push 9
lea eax, [ebp - 0xfe0]
push str.current
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
je 0x41946a
mov ecx, dword [0x496ca4]
mov esi, dword [0x496ca0]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x18
cmp edi, eax
jl 0x4193a4
jmp 0x419470
mov esi, dword [0x496ca0]
mov ecx, dword [0x496ca4]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jge 0x4195a8
lea ebx, [edi + edi*2]
shl ebx, 3
jmp 0x4194a0
cmp dword [ebx + esi + 0x14], 8
lea eax, [ebx + esi]
jb 0x4194ac
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1010]
push 0x800
push eax
call fcn.004513ee
lea ecx, [ebp - 0x1010]
add esp, 0xc
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4194d0
sub ecx, edx
sar ecx, 1
cmp ecx, 5
jb 0x4195a2
cmp word [ebp - 0x1010], 0x2d
je 0x4195a2
push 0x10
lea eax, [ebp - 0x1010]
push str.recoverysequence
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
jne 0x419534
lea ecx, [ebp - 0x1010]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419520
sub ecx, edx
sar ecx, 1
cmp ecx, 0x19
ja 0x419561
mov ecx, dword [0x496ca4]
mov esi, dword [0x496ca0]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x18
cmp edi, eax
jl 0x4194a0
jmp 0x4195a8
cmp word [ebp - 0xfe0], 0
jne 0x41956f
xor ecx, ecx
jmp 0x41958f
lea ecx, [ebp - 0xfe0]
lea edx, [ecx + 2]
jmp 0x419580
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419580
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0xfe0]
push eax
lea ecx, [ebp - 0x2a78]
call fcn.004023a0
mov esi, dword [0x496ca0]
cmp dword [ebp - 0x2a68], 0
je 0x4197a4
mov ecx, dword [0x496ca4]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
mov edi, 1
add eax, edx
cmp eax, edi
jle 0x4196c0
mov ebx, 0x18
cmp dword [ebx + esi + 0x14], 8
lea eax, [ebx + esi]
jb 0x4195ec
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1010]
push 0x800
push eax
call fcn.004513ee
mov eax, dword [0x496ca0]
add eax, 0xffffffe8
add eax, ebx
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x419613
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x2a18]
push 0x800
push eax
call fcn.004513ee
lea ecx, [ebp - 0x1010]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419631
sub ecx, edx
sar ecx, 1
cmp ecx, 0x19
jb 0x41968d
push 3
lea eax, [ebp - 0x2a18]
push 0x473884
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
jne 0x41968d
cmp dword [ebp - 0x2a64], 8
push dword [ebp - 0x2a68]
lea eax, [ebp - 0x2a78]
cmovae eax, dword [ebp - 0x2a78]
push eax
lea eax, [ebp - 0xfe0]
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
je 0x4196ba
mov ecx, dword [0x496ca4]
mov esi, dword [0x496ca0]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x18
cmp edi, eax
jl 0x4195e0
jmp 0x4196c0
mov esi, dword [0x496ca0]
cmp dword [ebp - 0x2a68], 0
je 0x4197a4
mov ecx, dword [0x496ca4]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jge 0x4197a4
lea ebx, [edi + edi*2]
shl ebx, 3
cmp dword [ebx + esi + 0x14], 8
lea eax, [ebx + esi]
jb 0x419700
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x1010]
push 0x800
push eax
call fcn.004513ee
lea ecx, [ebp - 0x1010]
add esp, 0xc
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419720
sub ecx, edx
sar ecx, 1
cmp ecx, 5
jb 0x4197a4
cmp word [ebp - 0x1010], 0x2d
je 0x4197a4
push 6
lea eax, [ebp - 0x1010]
push str.device
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
jne 0x419779
lea ecx, [ebp - 0x1010]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419761
sub ecx, edx
sar ecx, 1
cmp ecx, 0x19
ja 0x4197fd
mov ecx, dword [0x496ca4]
mov esi, dword [0x496ca0]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebx, 0x18
cmp edi, eax
jl 0x4196f4
mov ebx, 0x495e14
cmp dword [ebp - 0x2a20], 0
jne 0x419e97
cmp byte [ebp - 0x2ce9], 0
je 0x419e97
mov eax, dword [0x49460c]
mov dword [ebp - 0x2ce4], 0
test eax, eax
je 0x4197df
lea ecx, [ebp - 0x2ce4]
push ecx
call eax
mov edi, dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
xor esi, esi
push 9
mov ecx, ebx
test esi, esi
jne 0x419bc4
push 0x4738f4
jmp 0x419bc9
lea edx, [ebp - 0x1010]
xor ebx, ebx
mov ecx, 0x18
xor edi, edi
lea esi, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x419810
sub edx, esi
sar edx, 1
cmp edx, ecx
jle 0x419833
cmp word [ebp + ecx*2 - 0x1010], 0x5b
je 0x41983c
inc ecx
cmp ecx, edx
jl 0x419823
cmp word [ebp + ecx*2 - 0x1010], 0x5b
cmove ebx, ecx
mov dword [ebp - 0x2ce4], ebx
cmp ecx, edx
jge 0x419860
lea esp, [esp]
cmp word [ebp + ecx*2 - 0x1010], 0x5d
je 0x419869
inc ecx
cmp ecx, edx
jl 0x419850
cmp word [ebp + ecx*2 - 0x1010], 0x5d
cmove edi, ecx
test ebx, ebx
jle 0x4197a4
cmp edi, ebx
jle 0x4197a4
lea ecx, [edi + 1]
cmp edx, ecx
jle 0x4197a4
dec edx
cmp edx, ecx
jle 0x4198b9
lea esp, [esp]
movzx eax, word [ebp + edx*2 - 0x1010]
cmp eax, 0x5c
je 0x4198b9
cmp eax, 0x2c
jne 0x4198b4
cmp edx, 0x800
jae 0x4198ce
xor eax, eax
mov word [ebp + edx*2 - 0x1010], ax
dec edx
cmp edx, ecx
jg 0x419890
lea esi, [edx + edx]
lea edx, [ebp - 0x100e]
add edx, esi
cmp word [edx], 0
jne 0x4198d3
xor ecx, ecx
jmp 0x4198ef
call fcn.0045119a
mov ecx, edx
lea ebx, [ecx + 2]
jmp 0x4198e0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4198e0
sub ecx, ebx
sar ecx, 1
push ecx
mov ebx, 0x495e14
push edx
mov ecx, ebx
call fcn.004023a0
cmp esi, 0x1000
jae 0x4198ce
xor eax, eax
mov word [ebp + esi - 0x1010], ax
lea esi, [edi + edi]
lea edx, [ebp - 0x100e]
add edx, esi
cmp word [edx], ax
jne 0x419923
xor ecx, ecx
jmp 0x41993f
mov ecx, edx
lea edi, [ecx + 2]
jmp 0x419930
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419930
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2a60]
call fcn.004023a0
cmp esi, 0x1000
jae 0x4198ce
xor eax, eax
mov word [ebp + esi - 0x1010], ax
mov eax, dword [ebp - 0x2ce4]
lea edx, [ebp - 0x100e]
cmp word [edx + eax*2], 0
lea edx, [edx + eax*2]
jne 0x41997c
xor ecx, ecx
jmp 0x419990
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419981
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2a48]
call fcn.004023a0
cmp dword [ebp - 0x2a34], 8
push 7
lea eax, [ebp - 0x2a48]
cmovae eax, dword [ebp - 0x2a48]
push str.Device
push eax
call fcn.00450611
add esp, 0xc
test eax, eax
jne 0x419a6e
push 0x206
push eax
mov word [ebp - 0x1218], ax
lea eax, [ebp - 0x1216]
push eax
call fcn.00455910
add esp, 0xc
cmp dword [ebp - 0x2a34], 8
lea eax, [ebp - 0x2a48]
cmovae eax, dword [ebp - 0x2a48]
push eax
lea eax, [ebp - 0x1218]
push 0x104
push eax
call fcn.004513ee
add esp, 8
lea edx, [ebp - 0x2c98]
lea ecx, [ebp - 0x1218]
call fcn.0040e200
add esp, 4
test al, al
je 0x419a6e
lea ecx, [ebp - 0x2c98]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419a30
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 - 2]
cmp ecx, 0x208
jae 0x4198ce
xor eax, eax
mov word [ebp + ecx - 0x2c98], ax
lea eax, [ebp - 0x2c98]
push eax
lea ecx, [ebp - 0x2a48]
call fcn.00401f70
cmp dword [0x495e28], 8
mov edx, ebx
cmovae edx, dword [0x495e14]
cmp dword [ebp - 0x2a4c], 8
lea ecx, [ebp - 0x2a60]
cmovae ecx, dword [ebp - 0x2a60]
cmp dword [ebp - 0x2a34], 8
push edx
push ecx
lea eax, [ebp - 0x2a48]
cmovae eax, dword [ebp - 0x2a48]
push eax
lea eax, [ebp - 0x1a18]
push 0x4738e4
push eax
call fcn.00409760
add esp, 0x14
lea ecx, [ebp - 0x1a18]
call fcn.0040dd40
test al, al
je 0x419ba0
lea eax, [ebp - 0x2a60]
push eax
lea edx, [ebp - 0x2a48]
lea ecx, [ebp - 0x2d04]
call fcn.0044e9a0
add esp, 4
mov ecx, 0x495dfc
push eax
call fcn.00408ec0
lea ecx, [ebp - 0x2d04]
call fcn.00401f20
push 0xffffffffffffffff
push 0
push 0x495dfc
mov ecx, 0x495e2c
call fcn.004020b0
push 0xffffffffffffffff
push 0
push 0x495dfc
lea ecx, [ebp - 0x2a30]
call fcn.004020b0
lea eax, [ebp - 0x1a18]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov ecx, dword [0x495e44]
cmp eax, 0xffffffff
cmovne ecx, eax
sub esp, 0x18
mov dword [0x495e44], ecx
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push 0x495dfc
mov word [ecx], ax
call fcn.004020b0
call fcn.0040dcd0
add esp, 0x18
push 0
push 0x400
push edx
push eax
call fcn.0045dfb0
push 0
push 0x400
push edx
push eax
call fcn.0045dfb0
mov dword [0x496100], eax
mov dword [0x496104], edx
jmp 0x4197a9
cmp dword [0x495e28], 8
mov eax, ebx
cmovae eax, dword [0x495e14]
xor ecx, ecx
mov dword [0x495e24], 0
mov word [eax], cx
jmp 0x4197a9
push str.winre.dat
call fcn.004023a0
cmp dword [ebp - 0x2a4c], 8
lea ecx, [ebp - 0x2a60]
cmovae ecx, dword [ebp - 0x2a60]
cmp dword [ebp - 0x2a34], 8
push ecx
lea eax, [ebp - 0x2a48]
cmovae eax, dword [ebp - 0x2a48]
push eax
lea eax, [ebp - 0x1a18]
push str._s_s
push eax
call fcn.00409760
lea ecx, [ebp - 0x1a18]
add esp, 0x10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419c15
sub ecx, edx
sar ecx, 1
je 0x419c4d
cmp dword [0x495e28], 8
lea eax, [ebp - 0x2a30]
mov edx, ebx
cmovae edx, dword [0x495e14]
push 1
push eax
lea ecx, [ebp - 0x1a18]
call fcn.0040efc0
add esp, 8
cmp dword [ebp - 0x2a20], 0
jne 0x419e49
cmp dword [ebp - 0x2a34], 8
lea eax, [ebp - 0x2a48]
cmovae eax, dword [ebp - 0x2a48]
push eax
lea eax, [ebp - 0x1a18]
push str._sRecovery
push eax
call fcn.00409760
add esp, 0xc
cmp dword [ebp - 0x2a38], 0
je 0x419cb3
cmp dword [0x495e28], 8
lea eax, [ebp - 0x2a30]
mov edx, ebx
cmovae edx, dword [0x495e14]
push 1
push eax
lea ecx, [ebp - 0x1a18]
call fcn.0040efc0
add esp, 8
cmp dword [ebp - 0x2a20], 0
jne 0x419e49
cmp dword [0x495e28], 8
mov ecx, ebx
cmovae ecx, dword [0x495e14]
cmp dword [0x495d00], 8
push ecx
mov eax, 0x495cec
cmovae eax, dword [0x495cec]
push eax
lea eax, [ebp - 0x1a18]
push str._sSystem32Recovery_s
push eax
call fcn.00409760
add esp, 0x10
lea eax, [ebp - 0x2ce0]
push eax
lea eax, [ebp - 0x1a18]
push eax
mov dword [ebp - 0x2ce8], 0
call dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x419d7b
xor eax, eax
mov word [ebp - 0x1a18], ax
push 0x400
lea eax, [ebp - 0x1a18]
push eax
push str._SystemDrive_Recovery
call edi
cmp dword [0x495e28], 8
lea eax, [ebp - 0x2a30]
mov edx, ebx
cmovae edx, dword [0x495e14]
push 1
push eax
lea ecx, [ebp - 0x1a18]
call fcn.0040efc0
add esp, 8
cmp dword [ebp - 0x2a20], 0
jne 0x419e49
inc esi
cmp esi, 2
jl 0x4197e7
jmp 0x419e49
push eax
call dword [sym.imp.KERNEL32.DLL_FindClose]
push str.System32Recovery
mov edx, 0x495cec
lea ecx, [ebp - 0x2d04]
call fcn.004097c0
mov esi, eax
lea eax, [ebp - 0x2a30]
add esp, 4
cmp eax, esi
je 0x419e32
cmp dword [ebp - 0x2a1c], 8
jb 0x419dc1
push dword [ebp - 0x2a30]
call fcn.00450920
add esp, 4
xor eax, eax
mov dword [ebp - 0x2a1c], 7
mov dword [ebp - 0x2a20], 0
mov word [ebp - 0x2a30], ax
cmp dword [esi + 0x14], 8
jae 0x419dff
mov eax, dword [esi + 0x10]
inc eax
je 0x419e0d
add eax, eax
push eax
lea eax, [ebp - 0x2a30]
push esi
push eax
call fcn.0044ffb0
add esp, 0xc
jmp 0x419e0d
mov eax, dword [esi]
mov dword [ebp - 0x2a30], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x2a20], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x2a1c], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x2cf0], 8
jb 0x419e49
push dword [ebp - 0x2d04]
call fcn.00450920
add esp, 4
mov eax, dword [0x494608]
test eax, eax
je 0x419e5a
push dword [ebp - 0x2ce4]
call eax
cmp dword [ebp - 0x2a20], 0
je 0x419e7a
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2a30]
push eax
mov ecx, 0x495e2c
call fcn.004020b0
jmp 0x419e97
cmp dword [0x495e28], 8
mov dword [0x495e24], 0
cmovae ebx, dword [0x495e14]
xor eax, eax
mov word [ebx], ax
cmp dword [ebp - 0x2a1c], 8
jb 0x419eae
push dword [ebp - 0x2a30]
call fcn.00450920
add esp, 4
xor eax, eax
cmp dword [ebp - 0x2a4c], 8
mov dword [ebp - 0x2a1c], 7
mov dword [ebp - 0x2a20], 0
mov word [ebp - 0x2a30], ax
jb 0x419ee2
push dword [ebp - 0x2a60]
call fcn.00450920
add esp, 4
xor eax, eax
cmp dword [ebp - 0x2a34], 8
mov dword [ebp - 0x2a4c], 7
mov dword [ebp - 0x2a50], 0
mov word [ebp - 0x2a60], ax
jb 0x419f16
push dword [ebp - 0x2a48]
call fcn.00450920
add esp, 4
xor eax, eax
cmp dword [ebp - 0x2a64], 8
mov dword [ebp - 0x2a34], 7
mov dword [ebp - 0x2a38], 0
mov word [ebp - 0x2a48], ax
jb 0x419f4a
push dword [ebp - 0x2a78]
call fcn.00450920
add esp, 4
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.0044fdac
mov esp, ebp
pop ebp
ret