Function at 0x40e640
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f044b
mov eax, dword fs:[0]
push eax
sub esp, 0x2d0
mov eax, dword [0x6b7e40]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, edx
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x22c], ecx
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push 0
push 0x63bfdc
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x254], ecx
mov dword [ebp - 0x238], ebx
call fcn.00402090
sub esp, 8
xorps xmm3, xmm3
lea ecx, [ebp - 0x2dc]
mov byte [ebp - 0x225], 1
call fcn.00407710
xorps xmm0, xmm0
mov dword [ebp - 4], 0
movlpd qword [ebp - 0x274], xmm0
call fcn.004369b0
push 0x6c1ea4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [0x6c1e9a]
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, 1
mov byte [ebp - 0x226], al
test esi, esi
jle 0x40e703
push 0x6c1ea4
call edi
dec esi
test esi, esi
jg 0x40e6f7
cmp byte [ebp - 0x226], 0
jne 0x40ec87
push 0x63bfdc
lea ecx, [ebp - 0x240]
call fcn.004021e0
push 1
push 0
push 0
push 0
push ecx
mov ecx, esp
push 0x63bfdc
mov byte [ebp - 4], 1
call fcn.004021e0
lea eax, [ebp - 0x274]
push eax
push ebx
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 0x22c]
lea ecx, [ebp - 0x2dc]
call fcn.00407ad0
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
or esi, 0xffffffff
mov edi, eax
mov dword [ebp - 0x24c], eax
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40e787
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x40ec92
push ebx
lea ecx, [ebp - 0x2dc]
call fcn.00408850
movzx ebx, byte [ebp - 0x225]
mov edi, eax
xor eax, eax
test edi, edi
cmovne ebx, eax
xor al, al
mov dword [ebp - 0x24c], edi
mov byte [ebp - 0x225], bl
mov byte [ebp - 0x226], al
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x248], eax
test bl, bl
je 0x40ec9a
push 0
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x238]
lea eax, [ebp - 0x23c]
push eax
push 0x200
lea ecx, [ebp - 0x2dc]
call fcn.00408a90
mov edi, eax
mov dword [ebp - 0x24c], edi
test edi, edi
jne 0x40ec92
mov ecx, dword [ebp - 0x23c]
test ecx, ecx
je 0x40e929
cmp ecx, 4
jb 0x40e849
mov eax, dword [ebp - 0x248]
mov edx, 0xfffe
cmp word [ebp - 0x224], dx
movzx eax, al
mov ecx, 1
cmove eax, ecx
mov dword [ebp - 0x248], eax
mov byte [ebp - 0x226], al
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x230]
call fcn.00410190
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 2
call fcn.0040f1b0
mov eax, dword [ebp - 0x230]
cmp dword [eax - 0xc], 0
jl 0x40e90c
push str._html
push eax
call fcn.005bda07
mov ecx, eax
mov eax, dword [ebp - 0x230]
add esp, 8
test ecx, ecx
je 0x40e90c
sub ecx, eax
sar ecx, 1
js 0x40e90c
push 0
lea ecx, [ebp - 0x2dc]
call fcn.0040a650
xor bl, bl
lea ecx, [ebp - 0x240]
mov byte [ebp - 0x225], bl
call fcn.00404540
push 1
mov edx, 0x2853
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.00419a90
add esp, 4
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x22c]
push dword [ecx]
push dword [eax]
lea eax, [ebp - 0x240]
push eax
call fcn.00404520
add esp, 0xc
lea ecx, [ebp - 0x234]
call fcn.00401020
lea ecx, [ebp - 0x240]
call fcn.00401020
mov eax, dword [ebp - 0x230]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40e929
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x40ec9a
push 0x14
call fcn.004996c9
add esp, 4
mov dword [ebp - 0x234], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x40e952
mov ecx, eax
call fcn.004af6b0
jmp 0x40e954
xor eax, eax
push 0
push 0xffffffffffffffff
mov byte [ebp - 4], 0
push 0
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x240], eax
call fcn.004074c0
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x230]
lea edx, [ebp - 0x268]
mov eax, dword [ecx]
push edx
mov edx, dword [ebp - 0x244]
push 0x9081
push dword [edx]
call dword [eax + 0x24]
test eax, eax
jne 0x40eadd
lea edx, [ebp - 0x268]
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 7
call fcn.0041f510
mov eax, dword [ebp - 0x244]
mov byte [ebp - 4], 8
push dword [ebp - 0x22c]
push dword [eax]
push 0x1fc
push dword [ebp - 0x238]
call fcn.0043cd20
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
add esp, 0x10
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40e9fd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 6
jmp 0x40ea4f
push ecx
mov ecx, esp
mov dword [ebp - 0x22c], esp
push 0x63bfdc
call fcn.004021e0
mov ecx, dword [ebp - 0x238]
lea eax, [ebp - 0x234]
push eax
mov byte [ebp - 4], 0xa
call fcn.004075a0
mov byte [ebp - 4], 0xb
push 0x1fc
push eax
push 0xb3b
push str.C:_amintegration_tools_setupishield_sldim_baseFileDownloader.cpp
push 1
push 1
xor ecx, ecx
call fcn.004051a0
mov ecx, eax
mov byte [ebp - 4], 0xc
call fcn.004022e0
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40eac5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor bl, bl
mov edi, 0x64
mov byte [ebp - 0x225], bl
mov dword [ebp - 0x24c], edi
jmp 0x40ec3e
mov eax, dword [ebp - 0x23c]
xor ecx, ecx
test eax, eax
je 0x40ebf2
lea ecx, [ecx]
add ecx, eax
cmp byte [ebp - 0x248], 0
mov dword [ebp - 0x22c], ecx
je 0x40eb34
mov esi, eax
shr esi, 1
xor edx, edx
test esi, esi
jle 0x40eb31
jmp 0x40eb10
mov cl, byte [ebp + edx*2 - 0x224]
mov al, byte [ebp + edx*2 - 0x223]
mov byte [ebp + edx*2 - 0x224], al
mov byte [ebp + edx*2 - 0x223], cl
inc edx
cmp edx, esi
jl 0x40eb10
or esi, 0xffffffff
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x23c]
mov edx, dword [ebp - 0x230]
push ecx
mov eax, dword [edx]
lea ecx, [ebp - 0x224]
push ecx
mov ecx, edx
call dword [eax + 0x3c]
mov dword [ebp - 4], 6
jmp 0x40eb9d
mov eax, dword [ebp - 0x238]
push 0
lea ecx, [ebp - 0x224]
push ecx
push eax
lea eax, [ebp - 0x23c]
push eax
push 0x200
lea ecx, [ebp - 0x2dc]
call fcn.00408a90
mov edi, eax
mov dword [ebp - 0x24c], edi
test edi, edi
je 0x40ebda
xor bl, bl
mov byte [ebp - 0x225], bl
jmp 0x40ebf2
test bl, bl
je 0x40ebf2
mov eax, dword [ebp - 0x23c]
mov ecx, dword [ebp - 0x22c]
test eax, eax
jne 0x40eaf0
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x230]
mov eax, dword [ecx]
call dword [eax + 0x50]
mov dword [ebp - 4], 6
jmp 0x40ec3e
push 0
lea ecx, [ebp - 0x2dc]
call fcn.0040a650
mov ecx, dword [ebp - 0x230]
push 1
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x258]
add edx, 0xfffffff0
mov dword [ebp - method.CFileException.virtual_0], vtable.CFileException.0
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ec9a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40ec9a
mov edi, 2
mov dword [ebp - 0x24c], edi
xor bl, bl
mov byte [ebp - 0x225], bl
cmp byte [0x6c1e98], 0
je 0x40ecad
mov bl, 1
mov byte [ebp - 0x225], bl
jmp 0x40ecb5
test bl, bl
je 0x40f0fb
push 0x20
call fcn.004996c9
mov esi, eax
add esp, 4
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x234], esi
mov byte [ebp - 4], 0x11
test esi, esi
je 0x40ece8
mov ecx, esi
call fcn.004b0715
mov dword [esi], vtable.CStdioFileT.0
mov byte [esi + 0x18], 0
jmp 0x40ecf0
xor esi, esi
mov dword [ebp - 0x23c], esi
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x250], esi
mov byte [ebp - 4], 0
call fcn.004a3f99
mov dword [ebp - method.CFileException.virtual_0], vtable.CFileException.0
call fcn.004a4516
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40ed2b
push 0x80004005
call fcn.00402040
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x258], eax
lea ecx, [ebp - 0x258]
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x25c], 0xffffffff
call fcn.00401e60
mov eax, dword [ebp - 0x244]
mov byte [ebp - 4], 0x13
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40efe1
test al, 0x10
jne 0x40efe1
mov edx, dword [ebp - 0x244]
mov eax, dword [esi]
lea ecx, [ebp - 0x268]
push ecx
push 0x4020
push dword [edx]
mov ecx, esi
call dword [eax + 0x24]
test eax, eax
jne 0x40eec5
lea edx, [ebp - 0x268]
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 0x19
call fcn.0041f510
mov eax, dword [ebp - 0x244]
mov byte [ebp - 4], 0x1a
push dword [ebp - 0x22c]
push dword [eax]
push 0x1f7
push dword [ebp - 0x238]
call fcn.0043cd20
mov byte [ebp - 4], 0x19
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
or edi, 0xffffffff
add esp, 0x10
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ee00
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0x13
mov esi, dword [ebp - 0x23c]
jmp 0x40ee46
push ecx
mov ecx, esp
mov dword [ebp - 0x254], esp
push 0x63bfdc
call fcn.004021e0
mov ecx, dword [ebp - 0x238]
lea eax, [ebp - 0x234]
push eax
mov byte [ebp - 4], 0x1c
call fcn.004075a0
mov byte [ebp - 4], 0x1d
push 0x1f7
push eax
push 0xb95
push str.C:_amintegration_tools_setupishield_sldim_baseFileDownloader.cpp
push 1
push 1
xor ecx, ecx
call fcn.004051a0
mov ecx, eax
mov byte [ebp - 4], 0x1e
call fcn.004022e0
mov byte [ebp - 4], 0x13
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f0b9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f0b9
call fcn.004a4516
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40eee1
push 0x80004005
call fcn.00402040
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x248], eax
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 0x1f
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x5c]
test eax, eax
je 0x40ef7b
or edi, 0xffffffff
lea ebx, [ebx]
push 0x63eb7c
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.004067b0
add esp, 0xc
mov byte [ebp - 4], 0x20
mov eax, dword [eax]
mov ecx, dword [ebp - 0x254]
push dword [eax - 0xc]
push eax
call fcn.00404910
mov byte [ebp - 4], 0x1f
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ef63
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
lea ecx, [ebp - 0x248]
push ecx
mov ecx, esi
call dword [eax + 0x5c]
test eax, eax
jne 0x40ef10
mov edi, dword [ebp - 0x24c]
mov byte [ebp - 4], 0x21
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x50]
mov dword [ebp - 4], 0x1f
mov esi, dword [ebp - 0x23c]
jmp 0x40efb4
mov byte [ebp - 4], 0x13
mov edx, dword [ebp - 0x248]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f0c0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40f0c0
mov eax, dword [ebp - 0x244]
mov ebx, dword [ebp - 0x238]
push str.The_file_does_not_exist.
push dword [eax]
push 0x1f7
push ebx
call fcn.0043cd20
add esp, 0x10
lea ecx, [ebp - 0x22c]
push 0x63bfdc
call fcn.004021e0
lea eax, [ebp - 0x254]
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x15
call fcn.004075a0
mov edi, eax
xor ecx, ecx
call fcn.004051a0
mov ebx, eax
push ecx
mov byte [ebp - 4], 0x18
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
mov esi, esp
push ecx
call fcn.004046f0
add esp, 4
add eax, 0x10
push 0x1f7
push 0
push edi
push 0xb85
push str.C:_amintegration_tools_setupishield_sldim_baseFileDownloader.cpp
push 1
push 1
mov ecx, ebx
mov dword [esi], eax
call fcn.004055a0
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
or ebx, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f090
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x13
mov edx, dword [ebp - 0x254]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f0b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x23c]
mov edi, 0x64
xor bl, bl
test esi, esi
je 0x40f0cd
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x258]
add edx, 0xfffffff0
mov dword [ebp - method.CFileException.virtual_0], vtable.CFileException.0
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f0fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
test bl, bl
lea ecx, [ebp - 0x2dc]
cmovne edi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.00407850
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.005bc16b
mov esp, ebp
pop ebp
ret