Function at 0x418510
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49db40
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xd0
mov eax, dword [0x4d304c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xb8], edi
mov esi, dword [ebx + 8]
push 4
mov dword [ebp - 0xcc], esi
mov dword [edi + 0xb0], 0
mov dword [ebp - 0x18], 0
call fcn.00476ba8
add esp, 4
mov dword [ebp - 0xbc], eax
mov dword [ebp - 4], 0
mov dword [eax], 0
mov dword [eax], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 1
mov ecx, esi
call fcn.004070c0
push eax
lea ecx, [ebp - 0x70]
call fcn.00407220
mov byte [ebp - 4], 2
lea eax, [ebp - 0x70]
push 0x80
push 3
push 1
push 0xc0000000
push eax
lea ecx, [ebp - 0x18]
call fcn.0041b890
mov byte [ebp - 0xb1], al
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x70]
call fcn.00407180
cmp byte [ebp - 0xb1], 0
jne 0x418606
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0xb0], eax
mov edi, 2
jmp 0x4188e8
xorps xmm0, xmm0
movlpd qword [ebp - 0x38], xmm0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 4], 3
push 8
call fcn.00476ba8
mov esi, eax
mov dword [ebp - 0xbc], esi
mov byte [ebp - 4], 4
xorps xmm0, xmm0
movq qword [esi], xmm0
mov dword [esi], vtable.RC::RCInternetHandle.0
mov dword [esi + 4], 0
mov byte [ebp - 4], 5
sub esp, 0x10
mov dword [esi], vtable.RC::RCInternetSession.0
call fcn.0042cfc0
mov ecx, eax
call fcn.0042d6e0
mov dword [esi + 4], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x38]
push esi
call fcn.0041a0b0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], 4
push eax
push 0x49
push 0
call fcn.0042cfc0
mov ecx, eax
call fcn.0042d820
test eax, eax
je 0x4186a0
cmp dword [ebp - 0x1c], 0x40
jae 0x4186bc
push ecx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x40
push eax
push 0x49
push 0
call fcn.0042cfc0
mov ecx, eax
call fcn.0042d960
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], 4
push eax
push 0x4a
push 0
call fcn.0042cfc0
mov ecx, eax
call fcn.0042d820
test eax, eax
je 0x4186ec
cmp dword [ebp - 0x1c], 0x40
jae 0x418708
push ecx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x40
push eax
push 0x4a
push 0
call fcn.0042cfc0
mov ecx, eax
call fcn.0042d960
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
mov byte [ebp - 4], 6
mov dword [ebp - 0xd0], 0
mov byte [ebp - 4], 7
lea eax, [edi + 0xa0]
mov dword [ebp - 0xdc], eax
lea esi, [edi + 0xac]
lea eax, [ebp - 0x38]
mov dword [ebp - 0xd0], esi
push eax
lea ecx, [ebp - 0xd8]
call fcn.00419df0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x28], esi
test esi, esi
je 0x41877a
mov eax, dword [esi]
test eax, eax
je 0x41877a
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 8
mov ecx, dword [edi + 0xa4]
cmp dword [edi + 0xa8], ecx
je 0x4187c0
push ecx
push 8
call fcn.004036f0
mov ecx, dword [ebp - 0x34]
add esp, 8
mov dword [eax], 0
mov dword [eax + 4], 0
test ecx, ecx
je 0x4187af
lock inc dword [ecx + 4]
mov edx, dword [ebp - 0x38]
mov dword [eax], edx
mov dword [eax + 4], ecx
add dword [edi + 0xa4], 8
jmp 0x4187d0
lea edx, [ebp - 0x38]
push edx
push ecx
lea ecx, [edi + 0xa0]
call fcn.0041a200
test esi, esi
je 0x4187e6
mov eax, dword [esi]
test eax, eax
je 0x4187e1
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor esi, esi
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x41885d
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x41885d
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x418814
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41885d
mov eax, dword [ebp - 0x24]
xor ecx, ecx
add ecx, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc8], ecx
adc eax, 0
mov dword [ebp - 0xc4], eax
jne 0x418834
cmp ecx, 0x10000
jbe 0x41885d
lea eax, [ebp - 0xc8]
push eax
push 2
push 0
push 0
lea ecx, [ebp - 0x18]
call fcn.0041bac0
test al, al
jne 0x418942
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0xb0], eax
mov edi, 2
mov byte [ebp - 4], 7
test esi, esi
je 0x41887e
mov eax, dword [esi]
test eax, eax
je 0x418877
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 0x1d
lea ecx, [ebp - 0xdc]
call fcn.00416680
mov byte [ebp - 4], 3
mov esi, dword [ebp - 0xd4]
test esi, esi
je 0x4188bc
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x4188bc
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x4188bc
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x34]
test esi, esi
je 0x4188e8
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x4188e8
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x4188e8
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x418920
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x41890e
test eax, eax
je 0x41890e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
push 4
push esi
call fcn.00476e72
add esp, 8
mov dword [ebp - 0x18], 0
mov eax, edi
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.00476b97
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
mov eax, dword [ebp - 0xc8]
xorps xmm0, xmm0
add eax, 0xffff8000
movlpd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc4]
adc eax, 0xffffffff
push 0x28
mov dword [ebp - 0x20], eax
call fcn.00476ba8
add esp, 4
mov dword [ebp - 0xbc], eax
mov byte [ebp - 4], 9
xorps xmm0, xmm0
movups xmmword [eax], xmm0
mov ecx, eax
movups xmmword [eax + 0x10], xmm0
movq qword [eax + 0x20], xmm0
call fcn.0042a9a0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x30]
push dword [ebp - 0xbc]
mov dword [ebp - 0x30], 0
push eax
mov dword [ebp - 0x2c], 0
call fcn.0041a5d0
mov byte [ebp - 4], 0xa
add edi, 0xe4
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x24], edi
je 0x4189d2
mov eax, dword [edi]
test eax, eax
je 0x4189d2
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0xb8]
push eax
add ecx, 0xe8
call fcn.0041a160
mov byte [ebp - 4], 0xa
test edi, edi
je 0x418a07
mov eax, dword [edi]
test eax, eax
je 0x418a00
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x24], 0
push dword [ebp - 0x20]
mov edi, dword [ebp - 0xb8]
mov ecx, edi
push dword [ebp - 0x1c]
push dword [ebp - 0x38]
push dword [ebp - 0x30]
call fcn.00419630
test al, al
je 0x418d77
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x70]
push eax
call fcn.0042c560
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x70]
call fcn.0042e410
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xb8], edx
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x70]
call fcn.00407180
mov eax, dword [ebp - 0xc4]
cmp eax, dword [ebp - 0xb8]
ja 0x418d77
jb 0x418a78
mov eax, dword [ebp - 0xc8]
cmp eax, dword [ebp - 0x24]
ja 0x418d77
mov ecx, dword [edi + 0x78]
mov eax, ecx
mov edx, dword [edi + 0x7c]
or eax, edx
je 0x418aa2
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
je 0x418aa2
cmp dword [ebp - 0x24], ecx
jne 0x418d77
cmp dword [ebp - 0xb8], edx
jne 0x418d77
push ecx
push dword [ebp - 0x30]
lea eax, [ebp - 0x18]
mov ecx, edi
push eax
call fcn.00419430
cmp eax, 1
je 0x418d77
cmp eax, 5
je 0x418d77
cmp eax, 2
je 0x418d73
cmp eax, 3
je 0x418d73
lea eax, [edi + 0x10]
push eax
lea ecx, [ebp - 0xb0]
call fcn.004164c0
mov byte [ebp - 4], 0xd
lea eax, [ebp - 0xb0]
push eax
push dword [ebp - 0x30]
call fcn.00419890
movzx ecx, byte [ebp - 0x88]
test al, al
mov edx, 1
cmove ecx, edx
mov edx, dword [ebp - 0x94]
mov byte [ebp - 0x88], cl
mov ecx, dword [ebp - 0x98]
test edx, edx
ja 0x418b32
jb 0x418b28
cmp ecx, 0x8000
jae 0x418b32
mov edi, 2
jmp 0x418d62
mov eax, ecx
and eax, edx
cmp eax, 0xffffffff
je 0x418b50
add ecx, 0xffff8000
mov dword [ebp - 0x98], ecx
adc edx, 0xffffffff
mov dword [ebp - 0x94], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x8c], eax
mov eax, dword [edi + 0x98]
mov dword [ebp - 0xbc], eax
test eax, eax
je 0x418c59
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x58]
push eax
call fcn.0042c4d0
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x58]
call fcn.004070b0
test al, al
je 0x418c09
push ecx
push 0x4bc3d8
lea ecx, [edi + 0x10]
call fcn.00419ea0
cmp eax, 0xffffffff
je 0x418c09
push 0xffffffffffffffff
inc eax
lea ecx, [edi + 0x10]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00408f10
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x58]
push eax
call fcn.004071e0
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x70]
call fcn.00407180
push ecx
push 0x4bc3dc
lea ecx, [ebp - 0x58]
call fcn.0040ce80
cmp eax, 0xffffffff
je 0x418c09
push eax
push 0
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x58]
call fcn.00408f10
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x58]
push eax
call fcn.004071e0
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x70]
call fcn.00407180
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0xbc]
lea edx, [ebp - 0x86]
push dword [ebp - 0x1c]
push dword [ebp - 0xb8]
mov eax, dword [ecx]
push dword [ebp - 0x24]
push edx
push dword [ebp - 0xcc]
mov eax, dword [eax + 4]
lea edx, [ebp - 0x58]
push edx
call eax
test al, al
jne 0x418c4d
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x58]
call fcn.00407180
xor edi, edi
jmp 0x418d62
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x58]
call fcn.00407180
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x40], vtable.RC::ISimpleDownloadDataEvent.0
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0x18]
mov dword [ebp - 0x40], vtable.DL::TSimpleDownloadDataEvent.0
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 0x14
lea eax, [ebp - 0xb0]
push eax
push dword [ebp - 0x30]
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.00419960
test al, al
je 0x418d4a
lea ecx, [ebp - 0x18]
call fcn.0041ba10
lea ecx, [edi + 0x80]
call fcn.004070b0
test al, al
jne 0x418d43
xorps xmm0, xmm0
lea ecx, [ebp - 0x58]
movups xmmword [ebp - 0x58], xmm0
movq qword [ebp - 0x48], xmm0
call fcn.0040a080
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x58]
push dword [ebp - 0xcc]
call fcn.004150d0
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x58]
call fcn.0040a230
mov byte [ebp - 4], 0x16
lea eax, [edi + 0x80]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.004086e0
add esp, 8
test al, al
jne 0x418d2b
mov dword [edi + 0xb0], 0
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x70]
call fcn.00407180
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x58]
call fcn.00405ee0
mov edi, 2
jmp 0x418d4c
mov byte [ebp - 4], 0x15
lea ecx, [ebp - 0x70]
call fcn.00407180
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x58]
call fcn.00405ee0
mov edi, 1
jmp 0x418d4c
xor edi, edi
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x40], vtable.DL::TSimpleDownloadDataEvent.0
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x40], vtable.RC::ISimpleDownloadDataEvent.0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xb0]
call fcn.00407180
jmp 0x418d7c
xor edi, edi
jmp 0x418d7c
mov edi, 2
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x418862
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
jne 0x418862
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x2c]
or eax, 0xffffffff
lock xadd dword [ecx + 8], eax
jne 0x418862
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x418862