Function at 0x4a9640
Capabilities:
Check if file exists
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5db5ad
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x655140]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x6c], ecx
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x68], edx
test ecx, ecx
je 0x4a9946
test eax, eax
je 0x4a9946
test esi, esi
je 0x4a9946
push 0x5df4c0
push 0x100
call fcn.004b440f
xor edi, edi
mov dword [ebp - 0x80], vtable.CxAutoArray_unsigned_char_.0
add esp, 8
mov dword [ebp - 0x7c], edi
test eax, eax
je 0x4a96c5
mov edi, eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x7c], edi
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 0
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x4a96eb
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], eax
jmp 0x4a96ff
xorps xmm0, xmm0
movlpd qword [ebp - 0x5c], xmm0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x48], eax
call fcn.00402de0
mov ecx, eax
test ecx, ecx
je 0x4a9964
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3c], eax
push esi
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 1
call fcn.00408c10
test al, al
jne 0x4a9749
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a9730
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x3c]
call fcn.00408fa0
lea edx, [ebp - 0x3c]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x50]
call fcn.00489de0
mov byte [ebp - 4], 4
or eax, 0xffffffff
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4a9777
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x50]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4a978e
push dword [ebp - 0x50]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
xor ebx, ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
push ebx
push 0x80
push 4
push ebx
push 2
push 0x40000000
push esi
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4a97ff
call fcn.0040d920
test eax, eax
jns 0x4a9804
xor esi, esi
test ebx, ebx
je 0x4a97cc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x50]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4a97eb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x4a97f8
push edi
call fcn.004b44af
add esp, 4
mov eax, esi
jmp 0x4a9948
mov ebx, eax
mov dword [ebp - 0x74], ebx
push 2
lea eax, [ebp - 0x58]
xorps xmm0, xmm0
push eax
push 0
push ebx
movlpd qword [ebp - 0x5c], xmm0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4a9825
call fcn.0040d920
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x3c]
push 5
push eax
call fcn.00491610
mov esi, dword [ebp - 0x3c]
push 0xa
push 0
push esi
call fcn.004c9be0
add esp, 0xc
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x64], edx
add esi, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4a9861
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
mov eax, dword [ebp - 0x44]
push 0x100
push edi
mov dword [ebp - 0x3c], 0
mov eax, dword [eax + 0x10]
push dword [eax]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4a97bf
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4a993c
mov esi, dword [ebp - 0x60]
push 0
lea ecx, [ebp - 0x3c]
push ecx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a98c3
call fcn.0040d920
test eax, eax
js 0x4a97bf
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x3c], eax
jne 0x4a97bf
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
add ecx, eax
push eax
adc edx, 0
mov dword [ebp - 0x48], ecx
push edx
push ecx
push dword [ebp - 0x64]
mov dword [ebp - 0x4c], edx
push dword [ebp - 0x58]
push esi
push dword [ebp - 0x68]
push dword [ebp - 0x44]
push dword [ebp - 0x6c]
call fcn.004933e0
add esp, 0x24
test eax, eax
je 0x4a97bf
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
mov eax, dword [ebp - 0x44]
push 0x100
push edi
mov dword [ebp - 0x3c], 0
mov eax, dword [eax + 0x10]
push dword [eax]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4a97bf
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x4a98a3
mov esi, 1
jmp 0x4a97c1
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 - 0x14]
xor ecx, ebp
call fcn.004b3f1a
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402a80
int3