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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437627
mov eax, dword fs:[0]
push eax
mov eax, 0x12a0
call fcn.00416e20
mov eax, dword [0x45106c]
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.00406f20
mov byte [ebp - 4], 4
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 [0x451a20]
lea eax, [ebp - 0x1094]
push eax
lea ecx, [ebp - 0x10c4]
call fcn.00406e97
mov esi, eax
mov byte [ebp - 4], 6
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x1034], 0x800
jb 0x4059bf
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]
push 7
pop edi
test eax, eax
jne 0x405a03
mov word [ebp - 0x107c], ax
lea eax, [ebp - 0x1010]
push eax
mov dword [ebp - 0x1068], edi
call fcn.00408785
jmp 0x405a0f
push esi
mov dword [ebp - 0x1068], ebx
call fcn.00410210
lea ecx, [ebp - 0x1094]
call fcn.00408757
xor esi, esi
mov dword [ebp - 0x1050], edi
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], 0xa
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.00408785
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x1240]
mov eax, dword [ebp - 0x1018]
push ecx
cmp dword [ebp - 0x1014], eax
je 0x405aa9
mov ecx, eax
call fcn.004096dc
push 0x18
pop eax
add dword [ebp - 0x1018], eax
jmp 0x405ab5
push eax
lea ecx, [ebp - 0x101c]
call fcn.0040ab8a
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0xa
call fcn.00408757
xor eax, eax
mov dword [ebp - 0x126c], esi
push 0x446d4c
lea ecx, [ebp - 0x127c]
mov dword [ebp - 0x1268], edi
mov word [ebp - 0x127c], ax
call fcn.00408785
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x1264]
xor eax, eax
mov dword [ebp - 0x1254], esi
push 0x446f98
mov dword [ebp - 0x1250], edi
mov word [ebp - 0x1264], ax
call fcn.00408785
lea eax, [ebp - 0x127c]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x1264]
push eax
lea edx, [ebp - 0x107c]
lea ecx, [ebp - 0x12ac]
call fcn.0041453e
mov esi, eax
push 0x451a28
mov edx, 0x451a40
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x1294]
call fcn.0040a5e7
add esp, 0xc
mov edx, eax
mov byte [ebp - 4], 0xf
mov ecx, dword [edx + 0x14]
mov edi, dword [edx + 0x10]
sub ecx, edi
cmp dword [esi + 0x10], ecx
jbe 0x405b84
mov eax, dword [esi + 0x14]
sub eax, dword [esi + 0x10]
cmp eax, edi
jb 0x405b84
cmp dword [edx + 0x14], 8
jb 0x405b78
mov edx, dword [edx]
push edi
push edx
push ecx
mov ecx, esi
call fcn.0040c004
jmp 0x405b8c
push esi
mov ecx, edx
call fcn.0040b995
push eax
lea ecx, [ebp - 0x104c]
call fcn.004096dc
lea ecx, [ebp - 0x1294]
or ebx, 3
call fcn.00408757
lea ecx, [ebp - 0x12ac]
call fcn.00408757
lea ecx, [ebp - 0x1264]
call fcn.00408757
lea ecx, [ebp - 0x127c]
mov byte [ebp - 4], 0x14
call fcn.00408757
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 0x406226
lea edx, [ebp - 0x107c]
lea ecx, [ebp - 0x10ac]
call fcn.0041262f
push 7
pop esi
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x1240]
xor eax, eax
mov dword [ebp - 0x122c], esi
xor edi, edi
mov word [ebp - 0x1240], ax
push 0x446f9c
mov dword [ebp - 0x1230], edi
call fcn.00408785
mov byte [ebp - 4], 0x16
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.0040c0f7
push eax
lea ecx, [ebp - 0x1094]
call fcn.004096dc
mov ebx, esi
lea eax, [ebp - 0x1094]
mov byte [ebp - 4], 0x17
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406945
lea ecx, [ebp - 0x1094]
call fcn.00408757
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x15
call fcn.00408757
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.00408785
push 0x18
pop eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x1240]
mov eax, dword [ebp - 0x1018]
push ecx
cmp dword [ebp - 0x1014], eax
je 0x405ce8
mov ecx, eax
call fcn.004096dc
push 0x18
pop eax
add dword [ebp - 0x1018], eax
jmp 0x405cf4
push eax
lea ecx, [ebp - 0x101c]
call fcn.0040ab8a
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x15
call fcn.00408757
cmp dword [ebp - 0x1038], 8
lea eax, [ebp - 0x104c]
lea ecx, [ebp - 0x1240]
cmovae eax, dword [ebp - 0x104c]
push eax
call fcn.00406f20
cmp dword [ebp - 0x122c], 8
lea ecx, [ebp - 0x10f4]
lea eax, [ebp - 0x1240]
cmovae eax, dword [ebp - 0x1240]
push ecx
push eax
call fcn.00422293
pop ecx
pop ecx
lea ecx, [ebp - 0x1240]
call fcn.00408757
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 0x4060db
mov byte [ebp - 4], 0x19
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.00406f20
lea ecx, [ebp - 0x1094]
mov byte [ebp - 4], 0x1a
call fcn.004144f9
mov edx, dword [ebp - 0x10e0]
lea ecx, [ebp - 0x1094]
call fcn.004145e7
mov dword [ebp - 0x1244], eax
mov esi, edx
test eax, eax
jne 0x405dfe
test esi, esi
jne 0x405dfe
push str.Range_Not_Satisfiable
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0x1a0
call fcn.00408785
jmp 0x4060b2
mov edi, esi
xor ebx, ebx
sub edi, eax
lea eax, [ebp - 0xa8]
push 0x98
push ebx
push eax
inc edi
call fcn.00417f60
pop ecx
lea ecx, [ebp - 0xa8]
call fcn.0040704b
mov byte [ebp - 4], 0x1b
lea ecx, [ebp - 0xa8]
push dword [ebp - 0x10e0]
mov edx, 0x447024
push esi
mov esi, dword [ebp - 0x1244]
push esi
call fcn.0040a8f8
mov ecx, eax
call fcn.004075cf
mov ecx, eax
call fcn.0040a6d8
mov ecx, eax
call fcn.004075cf
mov edx, 0x446f98
mov ecx, eax
call fcn.0040a8f8
mov ecx, eax
call fcn.004075cf
push 0x98
lea eax, [ebp - 0x1224]
push ebx
push eax
call fcn.00417f60
pop ecx
lea ecx, [ebp - 0x1224]
call fcn.0040704b
push edi
mov edx, str.Content_Length:
mov byte [ebp - 4], 0x1c
lea ecx, [ebp - 0x1224]
call fcn.0040a8f8
mov ecx, eax
call fcn.004075cf
mov byte [ebp - 4], 0x1d
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 0x405ef6
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
test ecx, ecx
je 0x405ef6
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 0x405f1f
test byte [ebp - 0x68], 4
jne 0x405f2a
mov eax, dword [ebp - 0x88]
mov edx, dword [eax]
test edx, edx
je 0x405f2a
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.004087ac
lea eax, [ebp - 0x1240]
mov dword [ebp - 4], 0x1e
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406945
lea ecx, [ebp - 0x1240]
call fcn.00408757
mov byte [ebp - 4], 0x1f
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 0x405fa6
mov eax, dword [ebp - 0x1200]
mov ecx, dword [eax]
test ecx, ecx
je 0x405fa6
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 0x405fd5
test byte [ebp - 0x11e4], 4
jne 0x405fe0
mov eax, dword [ebp - 0x1204]
mov edx, dword [eax]
test edx, edx
je 0x405fe0
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.004087ac
push 0x2f
mov dword [ebp - 4], 0x1c
pop ebx
lea eax, [ebp - 0x1240]
mov byte [ebp - 4], 0x20
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406945
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x1c
call fcn.00408757
push str.Partial_Content
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0xce
call fcn.00408785
cmp edi, dword [ebp - 0x10e0]
jne 0x40605b
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 0x40609c
lea edx, [ebp - 0x104c]
lea ecx, [ebp - 0x107c]
call fcn.0040653d
test eax, eax
jne 0x40608c
push str.Internal_Server_Error
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0x1f4
call fcn.00408785
jmp 0x40609c
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.004064f1
lea ecx, [ebp - 0xa8]
call fcn.004064f1
lea ecx, [ebp - 0x1094]
call fcn.00408757
cmp dword [ebp - 0x1024], 0
je 0x406215
push dword [ebp - 0x1024]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x406215
push 0x98
lea eax, [ebp - 0xa8]
push edi
push eax
call fcn.00417f60
pop ecx
lea ecx, [ebp - 0xa8]
call fcn.0040704b
mov byte [ebp - 4], 0x21
lea ecx, [ebp - 0xa8]
push dword [ebp - 0x10e0]
mov edx, str.Content_Length:
call fcn.0040a8f8
mov ecx, eax
call fcn.004075cf
mov byte [ebp - 4], 0x22
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 0x406165
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
test ecx, ecx
je 0x406165
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 0x40618e
test byte [ebp - 0x68], 4
jne 0x406199
mov eax, dword [ebp - 0x88]
mov edx, dword [eax]
test edx, edx
je 0x406199
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.004087ac
mov dword [ebp - 4], 0x21
mov ebx, 0x87
lea eax, [ebp - 0x1240]
mov byte [ebp - 4], 0x23
push eax
lea ecx, [ebp - 0x101c]
call fcn.00406945
lea ecx, [ebp - 0x1240]
mov byte [ebp - 4], 0x21
call fcn.00408757
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 0x4470c0
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x1248], 0xc8
call fcn.00408785
lea ecx, [ebp - 0xa8]
call fcn.004064f1
lea ecx, [ebp - 0x10ac]
mov byte [ebp - 4], 0x14
call fcn.00408757
jmp 0x406261
mov esi, str.File_not_found
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406230
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.00408785
push 0x98
lea eax, [ebp - 0x118c]
push 0
push eax
call fcn.00417f60
pop ecx
lea ecx, [ebp - 0x118c]
call fcn.0040704b
mov byte [ebp - 4], 0x24
mov edi, dword [ebp - 0x1018]
mov esi, dword [ebp - 0x101c]
jmp 0x4062c7
cmp dword [esi + 0x14], 8
mov edx, esi
jb 0x40629c
mov edx, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x118c]
call fcn.0040da5a
lea eax, [esi + 0x18]
pop ecx
cmp eax, edi
je 0x4062c2
mov edx, 0x4469bc
lea ecx, [ebp - 0x118c]
call fcn.0040a8f8
push 0x18
pop eax
add esi, eax
cmp esi, edi
jne 0x406292
and dword [ebp - 0x1020], 0
mov esi, dword [0x456540]
mov byte [ebp - 4], 0x26
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 0x406333
mov eax, dword [ebp - 0x1168]
mov ecx, dword [eax]
test ecx, ecx
je 0x406333
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 0x406362
test byte [ebp - 0x114c], 4
jne 0x40636d
mov eax, dword [ebp - 0x116c]
mov edx, dword [eax]
test edx, edx
je 0x40636d
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.004087ac
mov dword [ebp - 4], 0x28
xor ebx, ebx
mov ecx, dword [ebp - 0x1020]
mov dword [ebp - 0x1020], ebx
test ecx, ecx
je 0x40638c
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov byte [ebp - 4], 0x27
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], 0x25
call fcn.00408757
mov ecx, dword [ebp - 0x124c]
push dword [ebp - 0x1020]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
mov byte [ebp - 4], 0x29
mov eax, dword [ebp - 0x1020]
test eax, eax
je 0x406408
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x118c]
call fcn.004064f1
lea ecx, [ebp - 0x104c]
call fcn.00408757
mov esi, dword [ebp - 0x101c]
test esi, esi
je 0x406474
mov edi, dword [ebp - 0x1018]
cmp esi, edi
je 0x406448
mov ecx, esi
call fcn.00408757
push 0x18
pop eax
add esi, eax
cmp esi, edi
jne 0x406432
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.0040b0b2
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.00408757
lea ecx, [ebp - 0x107c]
call fcn.00408757
mov byte [ebp - 4], 0x2a
mov eax, dword [ebp - 0x1028]
test eax, eax
je 0x40649e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x10c4]
call fcn.00408757
cmp dword [ebp - 0x102c], 0
je 0x4064be
push dword [ebp - 0x102c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 4], 0x2b
mov eax, dword [ebp - 0x1030]
test eax, eax
je 0x4064d5
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.00415b79
leave
ret