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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43731f
mov eax, dword fs:[0]
push eax
mov eax, 0x12a0
call fcn.00416a80
mov eax, dword [0x45006c]
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 dword [ebp - 0x124c], ecx
xor ebx, ebx
mov dword [ebp - 0x1244], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 4], bl
lea edx, [ebp - 0x1030]
mov eax, dword [ecx]
push edx
push ecx
mov dword [ebp - 0x1030], ebx
call dword [eax + 0xc]
mov byte [ebp - 4], 2
lea edx, [ebp - 0x102c]
mov eax, dword [ebp - 0x1030]
mov dword [ebp - 0x102c], ebx
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
push dword [ebp - 0x102c]
lea ecx, [ebp - 0x10c4]
call fcn.00406e5f
mov byte [ebp - 4], 5
lea edx, [ebp - 0x1028]
mov eax, dword [ebp - 0x1030]
mov dword [ebp - 0x1028], ebx
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
push 0xffffffffffffffff
push dword [0x450a20]
lea eax, [ebp - 0x1094]
push eax
lea ecx, [ebp - 0x10c4]
call fcn.00406dd6
mov esi, eax
mov byte [ebp - 4], 7
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x1034], 0x800
jb 0x405a02
mov eax, dword [esi]
push ebx
lea ecx, [ebp - 0x1034]
push ecx
lea ecx, [ebp - 0x1010]
push ecx
push eax
call dword [sym.imp.SHLWAPI.dll_UrlUnescapeW]
mov dword [ebp - 0x106c], ebx
lea ecx, [ebp - 0x107c]
test eax, eax
jne 0x405a47
mov word [ebp - 0x107c], ax
lea eax, [ebp - 0x1010]
push eax
mov dword [ebp - 0x1068], 7
call fcn.00408659
jmp 0x405a53
push esi
mov dword [ebp - 0x1068], ebx
call fcn.0040fee6
lea ecx, [ebp - 0x1094]
call fcn.0040862b
xor esi, esi
mov dword [ebp - 0x1050], 7
xor eax, eax
mov dword [ebp - 0x1228], esi
mov dword [ebp - 0x1054], esi
mov word [ebp - 0x1064], ax
lea edi, [ebp - 0x101c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x101c], esi
mov dword [ebp - 0x1018], esi
mov dword [ebp - 0x1014], esi
push 7
pop edi
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x1240]
xor eax, eax
mov dword [ebp - 0x1230], esi
push str.Cache_Control:_no_store
mov dword [ebp - 0x122c], edi
mov word [ebp - 0x1240], ax
call fcn.00408659
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x1240]
mov eax, dword [ebp - 0x1018]
push ecx
cmp dword [ebp - 0x1014], eax
je 0x405af1
mov ecx, eax
call fcn.004095fc
push 0x18
pop eax
add dword [ebp - 0x1018], eax
jmp 0x405afd
push eax
lea ecx, [ebp - 0x101c]
call fcn.0040aa26
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0xb
call fcn.0040862b
xor eax, eax
mov dword [ebp - 0x126c], esi
push 0x446d14
lea ecx, [ebp - 0x127c]
mov dword [ebp - 0x1268], edi
mov word [ebp - 0x127c], ax
call fcn.00408659
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x1264]
xor eax, eax
mov dword [ebp - 0x1254], esi
push 0x446f60
mov dword [ebp - 0x1250], edi
mov word [ebp - 0x1264], ax
call fcn.00408659
lea eax, [ebp - 0x127c]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x1264]
push eax
lea edx, [ebp - 0x107c]
lea ecx, [ebp - 0x12ac]
call fcn.0041419c
mov esi, eax
push 0x450a28
mov edx, 0x450a40
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x1294]
call fcn.0040a4da
add esp, 0xc
mov edx, eax
mov byte [ebp - 4], 0x10
mov ecx, dword [edx + 0x14]
mov edi, dword [edx + 0x10]
sub ecx, edi
cmp dword [esi + 0x10], ecx
jbe 0x405bcc
mov eax, dword [esi + 0x14]
sub eax, dword [esi + 0x10]
cmp eax, edi
jb 0x405bcc
cmp dword [edx + 0x14], 8
jb 0x405bc0
mov edx, dword [edx]
push edi
push edx
push ecx
mov ecx, esi
call fcn.0040be08
jmp 0x405bd4
push esi
mov ecx, edx
call fcn.0040b837
push eax
lea ecx, [ebp - 0x104c]
call fcn.004095fc
lea ecx, [ebp - 0x1294]
or ebx, 3
call fcn.0040862b
lea ecx, [ebp - 0x12ac]
call fcn.0040862b
lea ecx, [ebp - 0x1264]
call fcn.0040862b
lea ecx, [ebp - 0x127c]
mov byte [ebp - 4], 0x15
call fcn.0040862b
cmp dword [ebp - 0x1038], 8
lea eax, [ebp - 0x104c]
cmovae eax, dword [ebp - 0x104c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406272
lea edx, [ebp - 0x107c]
lea ecx, [ebp - 0x10ac]
call fcn.0041228d
push 7
pop esi
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0x1240]
xor eax, eax
mov dword [ebp - 0x122c], esi
xor edi, edi
mov word [ebp - 0x1240], ax
push 0x446f64
mov dword [ebp - 0x1230], edi
call fcn.00408659
mov byte [ebp - 4], 0x17
lea eax, [ebp - 0x10ac]
cmp dword [ebp - 0x1098], 8
lea ecx, [ebp - 0x1240]
push dword [ebp - 0x109c]
cmovae eax, dword [ebp - 0x10ac]
push eax
call fcn.0040befb
push eax
lea ecx, [ebp - 0x1094]
call fcn.004095fc
mov ebx, esi
push 0x18
pop eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x101c]
lea eax, [ebp - 0x1094]
push eax
call fcn.00406995
lea ecx, [ebp - 0x1094]
call fcn.0040862b
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x16
call fcn.0040862b
xor eax, eax
mov dword [ebp - 0x1230], edi
push str.Accept_Ranges:_bytes
lea ecx, [ebp - 0x1240]
mov dword [ebp - 0x122c], esi
mov word [ebp - 0x1240], ax
call fcn.00408659
mov byte [ebp - 4], 0x19
lea ecx, [ebp - 0x1240]
mov eax, dword [ebp - 0x1018]
push ecx
cmp dword [ebp - 0x1014], eax
je 0x405d30
mov ecx, eax
call fcn.004095fc
push 0x18
pop eax
add dword [ebp - 0x1018], eax
jmp 0x405d3c
push eax
lea ecx, [ebp - 0x101c]
call fcn.0040aa26
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x16
call fcn.0040862b
cmp dword [ebp - 0x1038], 8
lea eax, [ebp - 0x104c]
lea ecx, [ebp - 0x1240]
cmovae eax, dword [ebp - 0x104c]
push eax
call fcn.00406e5f
cmp dword [ebp - 0x122c], 8
lea ecx, [ebp - 0x10f4]
lea eax, [ebp - 0x1240]
cmovae eax, dword [ebp - 0x1240]
push ecx
push eax
call fcn.00421ef3
pop ecx
pop ecx
lea ecx, [ebp - 0x1240]
call fcn.0040862b
mov eax, dword [ebp - 0x1028]
lea edx, [ebp - 0x1034]
push edx
mov dword [ebp - 0x1034], edi
push str.Range
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
cmp dword [ebp - 0x1034], 0
je 0x406127
mov byte [ebp - 4], 0x1a
lea edx, [ebp - 0x1024]
mov eax, dword [ebp - 0x1028]
push edx
mov dword [ebp - 0x1024], edi
push str.Range
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
push dword [ebp - 0x1024]
lea ecx, [ebp - 0x1094]
call fcn.00406e5f
lea ecx, [ebp - 0x1094]
mov byte [ebp - 4], 0x1c
call fcn.00414157
mov edx, dword [ebp - 0x10e0]
lea ecx, [ebp - 0x1094]
call fcn.00414245
mov dword [ebp - 0x1244], eax
mov esi, edx
test eax, eax
jne 0x405e46
test esi, esi
jne 0x405e46
push str.Range_Not_Satisfiable
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0x1a0
call fcn.00408659
jmp 0x4060fa
mov edi, esi
xor ebx, ebx
sub edi, eax
lea eax, [ebp - 0xa8]
push 0x98
push ebx
push eax
inc edi
call fcn.00417bc0
pop ecx
lea ecx, [ebp - 0xa8]
call fcn.00406f8a
mov byte [ebp - 4], 0x1d
lea ecx, [ebp - 0xa8]
push dword [ebp - 0x10e0]
mov edx, 0x446fec
push esi
mov esi, dword [ebp - 0x1244]
push esi
call fcn.0040a794
mov ecx, eax
call fcn.0040750e
mov ecx, eax
call fcn.0040a574
mov ecx, eax
call fcn.0040750e
mov edx, 0x446f60
mov ecx, eax
call fcn.0040a794
mov ecx, eax
call fcn.0040750e
push 0x98
lea eax, [ebp - 0x1224]
push ebx
push eax
call fcn.00417bc0
pop ecx
lea ecx, [ebp - 0x1224]
call fcn.00406f8a
push edi
mov edx, str.Content_Length:
mov byte [ebp - 4], 0x1e
lea ecx, [ebp - 0x1224]
call fcn.0040a794
mov ecx, eax
call fcn.0040750e
mov byte [ebp - 4], 0x1f
xor eax, eax
test byte [ebp - 0x68], 2
mov dword [ebp - 0x1230], ebx
mov dword [ebp - 0x122c], 7
mov word [ebp - 0x1240], ax
mov dword [ebp - 0x1244], 0x17
jne 0x405f3e
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
test ecx, ecx
je 0x405f3e
cmp ecx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x94]
cmovb ecx, dword [ebp - 0x6c]
sub ecx, dword [eax]
sar ecx, 1
push ecx
push dword [eax]
jmp 0x405f67
test byte [ebp - 0x68], 4
jne 0x405f72
mov eax, dword [ebp - 0x88]
mov edx, dword [eax]
test edx, edx
je 0x405f72
mov eax, dword [ebp - 0x98]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x78]
mov eax, dword [eax]
add eax, eax
sub eax, ecx
add eax, edx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x1240]
call fcn.00408680
lea eax, [ebp - 0x1240]
mov dword [ebp - 4], 0x20
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406995
lea ecx, [ebp - 0x1240]
call fcn.0040862b
mov byte [ebp - 4], 0x21
xor eax, eax
test byte [ebp - 0x11e4], 2
mov dword [ebp - 0x1230], ebx
mov dword [ebp - 0x122c], 7
mov word [ebp - 0x1240], ax
mov dword [ebp - 0x1244], 0x4f
jne 0x405fee
mov eax, dword [ebp - 0x1200]
mov ecx, dword [eax]
test ecx, ecx
je 0x405fee
cmp ecx, dword [ebp - 0x11e8]
mov eax, dword [ebp - 0x1210]
cmovb ecx, dword [ebp - 0x11e8]
sub ecx, dword [eax]
sar ecx, 1
push ecx
push dword [eax]
jmp 0x40601d
test byte [ebp - 0x11e4], 4
jne 0x406028
mov eax, dword [ebp - 0x1204]
mov edx, dword [eax]
test edx, edx
je 0x406028
mov eax, dword [ebp - 0x1214]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x11f4]
mov eax, dword [eax]
add eax, eax
sub eax, ecx
add eax, edx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x1240]
call fcn.00408680
push 0x2f
mov dword [ebp - 4], 0x1e
pop ebx
lea eax, [ebp - 0x1240]
mov byte [ebp - 4], 0x22
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406995
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x1e
call fcn.0040862b
push str.Partial_Content
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0xce
call fcn.00408659
cmp edi, dword [ebp - 0x10e0]
jne 0x4060a3
cmp dword [ebp - 0x1038], 8
lea eax, [ebp - 0x104c]
lea ecx, [ebp - 0x1228]
cmovae eax, dword [ebp - 0x104c]
xor edi, edi
push ecx
push edi
push edi
push edi
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_SHCreateStreamOnFileEx]
jmp 0x4060e4
lea edx, [ebp - 0x104c]
lea ecx, [ebp - 0x107c]
call fcn.0040658d
test eax, eax
jne 0x4060d4
push str.Internal_Server_Error
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0x1f4
call fcn.00408659
jmp 0x4060e4
push edi
add eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_SHCreateMemStream]
mov dword [ebp - 0x1228], eax
lea ecx, [ebp - 0x1224]
call fcn.00406541
lea ecx, [ebp - 0xa8]
call fcn.00406541
lea ecx, [ebp - 0x1094]
call fcn.0040862b
cmp dword [ebp - 0x1024], 0
je 0x406261
mov byte [ebp - 4], 0x23
push dword [ebp - 0x1024]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x406261
push 0x98
lea eax, [ebp - 0xa8]
push edi
push eax
call fcn.00417bc0
pop ecx
lea ecx, [ebp - 0xa8]
call fcn.00406f8a
mov byte [ebp - 4], 0x24
lea ecx, [ebp - 0xa8]
push dword [ebp - 0x10e0]
mov edx, str.Content_Length:
call fcn.0040a794
mov ecx, eax
call fcn.0040750e
mov byte [ebp - 4], 0x25
xor eax, eax
test byte [ebp - 0x68], 2
mov dword [ebp - 0x1230], edi
mov dword [ebp - 0x122c], esi
mov word [ebp - 0x1240], ax
mov dword [ebp - 0x1244], 0x107
jne 0x4061b1
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
test ecx, ecx
je 0x4061b1
cmp ecx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x94]
cmovb ecx, dword [ebp - 0x6c]
sub ecx, dword [eax]
sar ecx, 1
push ecx
push dword [eax]
jmp 0x4061da
test byte [ebp - 0x68], 4
jne 0x4061e5
mov eax, dword [ebp - 0x88]
mov edx, dword [eax]
test edx, edx
je 0x4061e5
mov eax, dword [ebp - 0x98]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x78]
mov eax, dword [eax]
add eax, eax
sub eax, ecx
add eax, edx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x1240]
call fcn.00408680
mov dword [ebp - 4], 0x24
mov ebx, 0x87
lea eax, [ebp - 0x1240]
mov byte [ebp - 4], 0x26
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406995
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x24
call fcn.0040862b
cmp dword [ebp - 0x1038], 8
lea ecx, [ebp - 0x1228]
push ecx
push edi
push edi
push edi
lea eax, [ebp - 0x104c]
cmovae eax, dword [ebp - 0x104c]
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_SHCreateStreamOnFileEx]
push 0x447088
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0xc8
call fcn.00408659
lea ecx, [ebp - 0xa8]
call fcn.00406541
lea ecx, [ebp - 0x10ac]
mov byte [ebp - 4], 0x15
call fcn.0040862b
jmp 0x4062ad
mov esi, str.File_not_found
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40627c
sub ecx, edx
push ecx
push esi
call dword [sym.imp.SHLWAPI.dll_SHCreateMemStream]
push str.Not_Found
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1228], eax
mov dword [ebp - 0x1248], 0x194
call fcn.00408659
push 0x98
lea eax, [ebp - 0x118c]
push 0
push eax
call fcn.00417bc0
pop ecx
lea ecx, [ebp - 0x118c]
call fcn.00406f8a
mov byte [ebp - 4], 0x27
mov edi, dword [ebp - 0x1018]
mov esi, dword [ebp - 0x101c]
jmp 0x406313
cmp dword [esi + 0x14], 8
mov edx, esi
jb 0x4062e8
mov edx, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x118c]
call fcn.0040d7b4
lea eax, [esi + 0x18]
pop ecx
cmp eax, edi
je 0x40630e
mov edx, 0x4469bc
lea ecx, [ebp - 0x118c]
call fcn.0040a794
push 0x18
pop eax
add esi, eax
cmp esi, edi
jne 0x4062de
and dword [ebp - 0x1020], 0
mov esi, dword [0x455078]
mov byte [ebp - 4], 0x29
xor eax, eax
and dword [ebp - 0x1230], 0
or ebx, 0x400
test byte [ebp - 0x114c], 2
mov dword [ebp - 0x122c], 7
mov word [ebp - 0x1240], ax
mov dword [ebp - 0x1244], ebx
jne 0x40637f
mov eax, dword [ebp - 0x1168]
mov ecx, dword [eax]
test ecx, ecx
je 0x40637f
cmp ecx, dword [ebp - 0x1150]
mov eax, dword [ebp - 0x1178]
cmovb ecx, dword [ebp - 0x1150]
sub ecx, dword [eax]
sar ecx, 1
push ecx
push dword [eax]
jmp 0x4063ae
test byte [ebp - 0x114c], 4
jne 0x4063b9
mov eax, dword [ebp - 0x116c]
mov edx, dword [eax]
test edx, edx
je 0x4063b9
mov eax, dword [ebp - 0x117c]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x115c]
mov eax, dword [eax]
add eax, eax
sub eax, ecx
add eax, edx
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x1240]
call fcn.00408680
mov dword [ebp - 4], 0x2b
xor ebx, ebx
mov ecx, dword [ebp - 0x1020]
mov dword [ebp - 0x1020], ebx
test ecx, ecx
je 0x4063d8
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov byte [ebp - 4], 0x2a
lea edx, [ebp - 0x1240]
cmp dword [ebp - 0x122c], 8
lea edi, [ebp - 0x1020]
mov eax, dword [esi]
lea ecx, [ebp - 0x1064]
cmovae edx, dword [ebp - 0x1240]
cmp dword [ebp - 0x1050], 8
push edi
cmovae ecx, dword [ebp - 0x1064]
push edx
push ecx
push dword [ebp - 0x1248]
push dword [ebp - 0x1228]
push esi
call dword [eax + 0x10]
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x28
call fcn.0040862b
mov ecx, dword [ebp - 0x124c]
push dword [ebp - 0x1020]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
mov byte [ebp - 4], 0x2c
mov eax, dword [ebp - 0x1020]
test eax, eax
je 0x406454
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x118c]
call fcn.00406541
lea ecx, [ebp - 0x104c]
call fcn.0040862b
mov esi, dword [ebp - 0x101c]
test esi, esi
je 0x4064c0
mov edi, dword [ebp - 0x1018]
cmp esi, edi
je 0x406494
mov ecx, esi
call fcn.0040862b
push 0x18
pop eax
add esi, eax
cmp esi, edi
jne 0x40647e
mov esi, dword [ebp - 0x101c]
mov eax, dword [ebp - 0x1014]
sub eax, esi
push 0x18
pop ecx
cdq
idiv ecx
imul eax, eax, 0x18
push eax
push esi
call fcn.0040af4e
pop ecx
pop ecx
mov dword [ebp - 0x101c], ebx
mov dword [ebp - 0x1018], ebx
mov dword [ebp - 0x1014], ebx
lea ecx, [ebp - 0x1064]
call fcn.0040862b
lea ecx, [ebp - 0x107c]
call fcn.0040862b
mov byte [ebp - 4], 0x2d
mov eax, dword [ebp - 0x1028]
test eax, eax
je 0x4064ea
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x10c4]
call fcn.0040862b
cmp dword [ebp - 0x102c], 0
je 0x40650e
mov byte [ebp - 4], 0x2e
push dword [ebp - 0x102c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 4], 0x2f
mov eax, dword [ebp - 0x1030]
test eax, eax
je 0x406525
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor eax, eax
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.004157d7
leave
ret