Function at 0x409007
Capabilities:
Check http status code
Connect to http server
Create http request
Query remote server for available data
Read data from internet
Receive data
Send data
Send http request

Disassembly:
mov eax, 0x5e45da
call fcn.005c3f5c
mov eax, 0x102cc
call fcn.0057c4e0
push ebx
push esi
xor ebx, ebx
test byte [0x6b4158], 1
push edi
mov edi, 0x62bb80
jne 0x40904d
or dword [0x6b4158], 1
mov dword [ebp - 4], ebx
push edi
call fcn.00574a6b
mov esi, eax
pop ecx
mov dword [0x6b4154], esi
or dword [ebp - 4], 0xffffffff
jmp 0x409053
mov esi, dword [0x6b4154]
mov ecx, dword [ebp + 0xc]
push esi
push ebx
push edi
call fcn.004088d1
cmp eax, ebx
jl 0x409066
add esi, eax
jmp 0x409068
xor esi, esi
mov ecx, dword [ebp + 0xc]
push esi
push ebx
lea eax, [ebp - 0x7c]
push eax
call fcn.004095bf
mov dword [ebp - 4], 1
cmp esi, ebx
jle 0x4090f6
cmp dword [ebp - 0x64], 8
mov eax, dword [ebp - 0x78]
jae 0x40908d
lea eax, [ebp - 0x78]
push esi
mov edi, 0x62bb70
push edi
push eax
call fcn.00577b01
add esp, 0xc
test eax, eax
je 0x4090f6
cmp dword [ebp + 0x10], ebx
je 0x4090d6
cmp dword [ebp - 0x64], 8
mov eax, dword [ebp - 0x78]
jae 0x4090b2
lea eax, [ebp - 0x78]
push edi
push eax
push str.CHECK_PROTOCOL_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
mov edi, dword [ebp + 0x10]
push eax
push 2
pop esi
call fcn.00420400
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x7c]
call fcn.00403955
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
push 7
pop edi
push ebx
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x48], edi
call fcn.00403a3c
mov byte [ebp - 4], 2
push ebx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x24], edi
call fcn.00403a3c
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0xc]
push 1
push esi
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x2f
call fcn.004088d1
mov ecx, dword [ebp + 0xc]
mov edi, eax
cmp edi, ebx
jle 0x409185
sub eax, esi
push eax
push esi
lea eax, [ebp - 0x98]
push eax
call fcn.004095bf
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x60]
call fcn.00403a5a
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x98]
call fcn.00403955
mov ecx, dword [ebp + 0xc]
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x98]
push eax
call fcn.004095bf
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3c]
jmp 0x40919b
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x98]
push eax
call fcn.004095bf
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x60]
push 0xffffffffffffffff
push ebx
push eax
call fcn.00403a5a
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x98]
call fcn.00403955
push ebx
push ebx
push ebx
push 1
push str.YmirPatcherv1.8.1
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x409218
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.INTERNET_OPEN_ERROR
call fcn.00403080
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
pop ecx
pop ecx
mov byte [ebp - 4], 2
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.00403955
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x60]
call fcn.00403955
jmp 0x4090d6
cmp dword [ebp - 0x48], 8
mov eax, dword [ebp - 0x5c]
jae 0x409224
lea eax, [ebp - 0x5c]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push eax
push dword [ebp - 0x20]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x44], eax
cmp eax, ebx
jne 0x40927c
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
cmp dword [ebp - 0x48], 8
mov esi, dword [ebp - 0x5c]
jae 0x409250
lea esi, [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_CONNECT_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
add esp, 0xc
jmp 0x4091f5
cmp dword [ebp - 0x24], 8
mov eax, dword [ebp - 0x38]
jae 0x409288
lea eax, [ebp - 0x38]
push ebx
push SysReAllocString
push ebx
push ebx
push str.HTTP_1.0
push eax
push 0x62bc44
push dword [ebp - 0x44]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, ebx
jne 0x4092d3
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x4092c4
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_OPEN_REQUEST_ERROR
jmp 0x40925d
push 0x200
lea eax, [ebp - 0x2d8]
push ebx
push eax
call fcn.00576e90
add esp, 0xc
push ebx
push ebx
push ebx
lea eax, [ebp - 0x2d8]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x409326
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x409314
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_SEND_REQUEST_ERROR
jmp 0x40925d
push 0x40
pop edi
push edi
lea eax, [ebp - 0xd8]
push ebx
push eax
call fcn.00576e90
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd8]
push eax
push 0x13
push esi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x409387
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x409375
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_CODE_ERROR
jmp 0x40925d
lea eax, [ebp - 0xd8]
push eax
call fcn.00577ba7
pop ecx
cmp eax, 0xc8
je 0x4093db
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x4093b2
lea esi, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_NOT_OK
call fcn.00403080
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
add esp, 0x10
jmp 0x4091f5
push edi
lea eax, [ebp - 0xd8]
push ebx
push eax
call fcn.00576e90
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd8]
push eax
push 5
push dword [ebp - 0x1c]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x409446
mov edi, dword [ebp + 0x10]
cmp edi, ebx
je 0x4091f5
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x409423
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_CONTENT_LENGTH_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
push eax
push str._s__path_s__error_d_
jmp 0x4093cb
lea eax, [ebp - 0xd8]
push eax
call fcn.00577bbd
mov esi, dword [ebp + 8]
pop ecx
mov dword [ebp - 0x18], eax
call fcn.0040959a
push esi
call fcn.00409554
mov esi, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
xor edi, edi
jmp 0x4094b3
mov eax, 0x10000
cmp dword [ebp - 0x40], eax
jae 0x40947b
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x14]
push ecx
push eax
lea eax, [ebp - 0x102d8]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4094dd
cmp dword [ebp - 0x14], ebx
je 0x4094c2
push dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x102d8]
push eax
call fcn.004077f6
add edi, dword [ebp - 0x14]
cmp edi, dword [ebp - 0x18]
jae 0x4094c2
push ebx
push ebx
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x1c]
call esi
test eax, eax
jne 0x40946e
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x44]
call esi
push dword [ebp - 0x20]
call esi
mov byte [ebp - 0xd], 1
jmp 0x40951f
cmp dword [ebp + 0x10], ebx
je 0x40951c
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x4094ee
lea esi, [ebp - 0x38]
push dword [ebp - 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_READ_FILE_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
mov edi, dword [ebp + 0x10]
push eax
push 2
pop esi
call fcn.00420400
add esp, 0x14
mov byte [ebp - 0xd], bl
mov byte [ebp - 4], 2
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.00403955
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x60]
call fcn.00403955
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x7c]
call fcn.00403955
mov al, byte [ebp - 0xd]
jmp 0x4090e7