Function at 0x456110
Capabilities:
Create http request
Delete file
Download and write a file
Get file attributes
Query remote server for available data
Read .ini file
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4a85a0
push eax
mov eax, 0x186e0
mov dword fs:[0], esp
call fcn.00488a40
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], edi
mov dword [esp + 0x186f8], 0
call fcn.00457cf0
test eax, eax
jne 0x4565cc
mov eax, dword [edi + 4]
push str.Download_Patch_Info_File
push eax
call fcn.0044a930
push eax
call fcn.0044abc0
mov edx, dword [str.update.dat]
add esp, 8
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call fcn.0049da84
lea eax, [esp + 0x2c]
push eax
call fcn.004105d0
add esp, 8
mov ecx, eax
mov byte [esp + 0x186f8], 1
call fcn.004125b0
push eax
push 0
push str.UpdateFileNumber
push str.Update
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ebx, eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x38], ebx
mov byte [esp + 0x186f8], 0
call fcn.0049da16
mov ecx, dword [edi + 4]
push ebx
push str.Number_of_download_file_:__d
push ecx
call fcn.0044a930
push eax
call fcn.0044abc0
add esp, 0x10
test ebx, ebx
je 0x4565cc
mov eax, dword [0x4cd448]
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
mov esi, 1
mov byte [esp + 0x186f8], 5
cmp ebx, esi
mov dword [esp + 0x30], esi
jl 0x4565ea
push esi
lea edx, [esp + 0x28]
push str.UpdateFile_d
push edx
call fcn.004989ae
add esp, 0xc
lea ecx, [esp + 0x24]
push str.NULL
call fcn.004125b0
push eax
mov eax, dword [str.update.dat]
push str.Update
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push eax
call fcn.0049da84
lea ecx, [esp + 0x50]
push ecx
call fcn.004105d0
add esp, 8
mov ecx, eax
mov byte [esp + 0x18704], 6
call fcn.004125b0
lea edx, [esp + 0x58]
push eax
push edx
call fcn.0041c3b0
add esp, 0x14
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x186fc], 7
call fcn.0049db4f
lea ecx, [esp + 0x4c]
mov byte [esp + 0x186f8], 6
call fcn.0049da16
lea ecx, [esp + 0x40]
mov byte [esp + 0x186f8], 5
call fcn.0049da16
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18700]
push eax
push ecx
lea edx, [esp + 0x20]
push str._s_s
push edx
call fcn.004989ae
mov eax, dword [esp + 0x28]
mov ecx, dword [edi + 4]
add esp, 0x10
push eax
push esi
push str.__d__Download_file_URL_:__s
push ecx
call fcn.0044a930
push eax
call fcn.0044abc0
add esp, 0x10
lea edx, [esp + 0x18]
mov esi, esp
mov dword [esp + 0x38], esp
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
call fcn.0049d78b
push esi
call fcn.0044a7a0
add esp, 8
lea eax, [esp + 0x48]
push eax
call fcn.004105d0
add esp, 8
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push eax
mov byte [esp + 0x186fc], 8
call fcn.0049db9f
lea ecx, [esp + 0x44]
mov byte [esp + 0x186f8], 5
call fcn.0049da16
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.0049d78b
lea eax, [esp + 0x30]
push eax
call fcn.004105d0
mov esi, dword [eax]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x2c]
call fcn.0049da16
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
push 0
push 0
push 0
push 1
push str.HTTP
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
test esi, esi
je 0x456424
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
lea ecx, [esp + 0x1c]
push 4
push ecx
push 2
push esi
mov dword [esp + 0x2c], 0xbb8
call edi
lea edx, [esp + 0x1c]
push 4
push edx
push 5
push esi
call edi
lea eax, [esp + 0x1c]
push 4
push eax
push 6
push esi
call edi
lea ecx, [esp + 0x1c]
push 4
push ecx
push 7
push esi
call edi
lea edx, [esp + 0x1c]
push 4
push edx
push 8
push esi
call edi
push 0
push 0x84000000
push 0
push 0
push ebp
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
test edi, edi
jne 0x45646d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
push 0x84000000
push edi
push edi
push ebp
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
test edi, edi
jne 0x45646d
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
cmp eax, edx
je 0x45656d
mov eax, dword [esp + 0x20]
push str.Download_Patch_Info_File_Faile._Try_Next_Again
mov ecx, dword [eax + 4]
push ecx
call fcn.0044a930
push eax
call fcn.0044abc0
add esp, 0xc
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x20]
inc esi
cmp esi, eax
mov dword [esp + 0x30], esi
jle 0x45620e
jmp 0x4565ea
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x45649b
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
jmp 0x456424
mov ebx, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
push 0
lea eax, [esp + 0x2c]
push 0
push eax
push edi
call ebx
test eax, eax
je 0x4564ff
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x3c]
push ecx
lea eax, [esp + 0x54]
push edx
push eax
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4564ff
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x48]
push 0
push ecx
lea eax, [esp + 0x58]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4564ff
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x456517
push 0
lea ecx, [esp + 0x2c]
push 0
push ecx
push edi
call ebx
test eax, eax
jne 0x4564b1
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x456424
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str..cab
lea ecx, [esp + 0x14]
call fcn.00498628
cmp eax, 0xffffffff
jne 0x456542
jmp 0x45644f
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x20]
push str.Download_Patch_Info_File_Faile._Cab_Find_
mov eax, dword [edx + 4]
push eax
jmp 0x45657a
mov ecx, dword [esp + 0x20]
push str.Download_Patch_Info_File_Faile._End_Patch
mov edx, dword [ecx + 4]
push edx
call fcn.0044a930
push eax
call fcn.0044abc0
add esp, 0xc
lea ecx, [esp + 0x10]
mov byte [esp + 0x186f8], 4
call fcn.0049da16
lea ecx, [esp + 0x18]
mov byte [esp + 0x186f8], 3
call fcn.0049da16
lea ecx, [esp + 0x14]
mov byte [esp + 0x186f8], 2
call fcn.0049da16
lea ecx, [esp + 0x24]
mov byte [esp + 0x186f8], 0
call fcn.0049da16
lea ecx, [esp + 0x18700]
mov dword [esp + 0x186f8], 0xffffffff
call fcn.0049da16
xor eax, eax
jmp 0x4566ba
mov eax, dword [edi + 4]
push str.Success_Download_files
push eax
call fcn.0044a930
push eax
call fcn.0044abc0
mov edx, dword [str.update.dat]
add esp, 8
mov ecx, esp
mov dword [esp + 0x4c], esp
push edx
call fcn.0049da84
lea eax, [esp + 0x30]
push eax
call fcn.004105d0
mov esi, dword [eax]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x2c]
call fcn.0049da16
mov ecx, dword [edi + 4]
push str.Download_Patch_Info_File
push ecx
call fcn.0044a930
push eax
call fcn.0044abc0
add esp, 0xc
lea ecx, [esp + 0x10]
mov byte [esp + 0x186f8], 4
call fcn.0049da16
lea ecx, [esp + 0x18]
mov byte [esp + 0x186f8], 3
call fcn.0049da16
lea ecx, [esp + 0x14]
mov byte [esp + 0x186f8], 2
call fcn.0049da16
lea ecx, [esp + 0x24]
mov byte [esp + 0x186f8], 0
call fcn.0049da16
lea ecx, [esp + 0x18700]
mov dword [esp + 0x186f8], 0xffffffff
call fcn.0049da16
mov eax, 1
mov ecx, dword [esp + 0x186f0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x186ec
ret 4