Function at 0x408510
Capabilities:
Check http status code
Connect to http server
Copy file
Get file attributes
Move file
Read and send data from client to server
Read data from internet
Read file on windows
Receive data
Send data
Send http request
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430421
mov eax, dword fs:[0]
push eax
mov eax, 0xc534
call fcn.00411990
mov eax, dword [0x444070]
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 edi, ecx
mov dword [ebp - 0xc528], edi
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
push 0x2548
push eax
lea eax, [ebp - 0xc500]
mov dword [ebp - 0xc524], ecx
mov ecx, dword [ebp + 0x14]
push eax
mov dword [ebp - 0xc51c], esi
mov dword [ebp - 0xc50c], ecx
call fcn.00413610
xor ebx, ebx
add esp, 0xc
mov dword [ebp - 0xc504], ebx
mov byte [edi + 0x10], bl
mov byte [ebp - 0xc505], bl
cmp dword [ebp - 0xa7bc], ebx
jne 0x4085b6
test esi, esi
je 0x4085ac
push str.Protocol_not_supported
push 5
push dword [ebp - 0xc50c]
call esi
add esp, 0xc
mov eax, 0x44d
jmp 0x409226
push ebx
push ebx
push dword [ebp - 0xa7bc]
lea eax, [ebp - 0xc440]
push eax
lea eax, [ebp - 0xc4c0]
push eax
push dword [ebp - 0xbfc0]
lea eax, [ebp - 0xc3c0]
push eax
push dword [edi + 4]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0xc510], eax
mov dword [ebp - 4], ebx
test eax, eax
jne 0x40860f
test esi, esi
je 0x408605
push str.InternetConnect___failed
push 5
push dword [ebp - 0xc50c]
call esi
add esp, 0xc
mov ebx, 0x3e8
jmp 0x409224
mov edx, ebx
movzx ecx, word [ebp + edx - 0xbfbc]
lea edx, [edx + 2]
mov word [ebp + edx - 0x2a1a], cx
test cx, cx
jne 0x408611
lea edx, [ebp - 0xb7bc]
mov esi, edx
mov cx, word [edx]
add edx, 2
cmp cx, bx
jne 0x408631
lea edi, [ebp - 0x2a18]
sub edx, esi
sub edi, 2
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x408647
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
cmp dword [ebp - 0xa7bc], 3
rep movsb byte es:[edi], byte [esi]
jne 0x409279
cmp dword [ebp - 0xbfc0], 0x1bb
mov edx, 0xc00000
push ebx
mov ecx, 0x400000
mov dword [ebp - 0xc53c], 0x43ec50
cmove ecx, edx
mov dword [ebp - 0xc538], ebx
push ecx
mov dword [ebp - 0xc530], ecx
lea ecx, [ebp - 0xc53c]
push ecx
push ebx
push ebx
lea ecx, [ebp - 0x2a18]
push ecx
push str.HEAD
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
mov dword [ebp - 0xc534], ebx
xor eax, eax
mov byte [ebp - 4], 1
mov esi, dword [sym.imp.WININET.dll_HttpSendRequestW]
push eax
push eax
push eax
push eax
push ebx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40873e
call edi
cmp eax, 0x2f19
jne 0x408733
lea eax, [ebp - 0xc518]
mov dword [ebp - 0xc518], 4
push eax
lea eax, [ebp - 0xc514]
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0xc514], 0x80
lea eax, [ebp - 0xc514]
push 4
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
xor eax, eax
push eax
push eax
push eax
push eax
push ebx
call esi
test eax, eax
jne 0x40873e
call edi
cmp eax, 0x2efd
je 0x40885d
mov esi, dword [ebp - 0xc528]
mov ecx, esi
push ebx
call fcn.004083a3
mov ecx, esi
call fcn.0040833d
push 0x13
xor edi, edi
push ebx
mov dword [ebp - 0xc52c], edi
call fcn.00408250
cmp eax, 0xc8
je 0x40886c
cmp eax, 0x12c
jle 0x40885d
cmp eax, 0x12e
jle 0x40879a
cmp eax, 0x194
jne 0x40885d
mov dword [ebp - 0xc504], 0x451
jmp 0x408d6e
mov esi, dword [ebp - 0xc510]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, edi
mov dword [ebp - 0xc510], esi
test ebx, ebx
je 0x4087c2
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, edi
mov dword [ebp - 0xc534], ebx
mov edi, dword [ebp - 0xc528]
mov ecx, edi
push str.Location:
call fcn.004082d1
lea edx, [ebp - 0x7a18]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x4087dc
cmp word [ebp - 0x7a18], si
jne 0x40881f
mov eax, dword [ebp - 0xc51c]
test eax, eax
je 0x408810
push str.Redirected_to_unknown_location
push 5
push dword [ebp - 0xc50c]
call eax
add esp, 0xc
mov dword [ebp - 0xc504], 0x456
jmp 0x409266
lea eax, [ebp - 0x7a18]
push eax
lea ecx, [ebp - 0x9fb8]
call fcn.00407d74
push dword [ebp - 0xc50c]
mov eax, dword [ebp - 0xc51c]
mov ecx, edi
push eax
push dword [ebp - 0xc524]
lea eax, [ebp - 0x9fb8]
push eax
call fcn.00408510
mov dword [ebp - 0xc504], eax
jmp 0x409266
mov dword [ebp - 0xc504], 0x454
jmp 0x408d6e
push 5
push ebx
call fcn.00408250
mov dword [ebp - 0xc52c], eax
test ebx, ebx
je 0x40888d
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor ebx, ebx
mov dword [ebp - 0xc534], ebx
push str.Content_Type:
mov ecx, esi
mov byte [ebp - 0xc506], 0
call fcn.004082d1
lea edx, [ebp - 0x218]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x4088a8
lea eax, [ebp - 0x218]
push str.text_html
push eax
call fcn.00412d90
pop ecx
pop ecx
test eax, eax
jne 0x4088e5
lea eax, [ebp - 0x218]
push str.text_plain
push eax
call fcn.00412d90
pop ecx
pop ecx
test eax, eax
je 0x408928
mov esi, dword [ebp - 0xc51c]
mov edi, dword [ebp - 0xc50c]
mov byte [ebp - 0xc506], 1
test esi, esi
je 0x408934
lea eax, [ebp - 0xa7b8]
push eax
push 6
push edi
call esi
add esp, 0xc
neg al
sbb al, al
add al, 1
mov byte [ebp - 0xc505], al
je 0x408934
mov dword [ebp - 0xc504], 0x44e
jmp 0x408d6e
mov esi, dword [ebp - 0xc51c]
mov edi, dword [ebp - 0xc50c]
push 0x400
lea eax, [ebp - 0x1618]
push 0
push eax
call fcn.00413b90
add esp, 0xc
push 0x2f
pop eax
push eax
lea eax, [ebp - 0xbfbc]
push eax
call fcn.00412ce2
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x4089a4
push 0x2f
pop esi
add ecx, 2
lea eax, [ebp - 0x1618]
sub eax, ecx
mov edx, ecx
mov dword [ebp - 0xc518], eax
mov edi, eax
movzx eax, word [edx]
mov word [edi + edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x40897a
push esi
push ecx
call fcn.00412ce2
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x408965
mov esi, dword [ebp - 0xc51c]
mov edi, dword [ebp - 0xc50c]
lea eax, [ebp - 0x1618]
push 0x3f
push eax
call fcn.00412ce2
pop ecx
pop ecx
test eax, eax
je 0x4089bd
xor ecx, ecx
mov word [eax], cx
test esi, esi
je 0x408a1d
lea eax, [ebp - 0x1618]
push eax
push 7
push edi
call esi
add esp, 0xc
neg al
sbb al, al
add al, 1
je 0x4089e7
mov dword [ebp - 0xc504], 0x450
jmp 0x408d6e
lea eax, [ebp - 0xc52c]
push eax
push 1
push edi
call esi
add esp, 0xc
neg al
sbb al, al
add al, 1
mov byte [ebp - 0xc505], al
je 0x408a1d
push 0
push 3
push edi
call esi
add esp, 0xc
mov dword [ebp - 0xc504], 0x452
jmp 0x408d6e
mov esi, dword [ebp - 0xc524]
xor edx, edx
test esi, esi
je 0x408a47
cmp word [esi], dx
je 0x408a47
lea ecx, [ebp - 0xa18]
sub ecx, esi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x408a36
jmp 0x408a5f
mov eax, dword [0x43ece8]
mov dword [ebp - 0xa18], eax
mov ax, word [0x43ecec]
mov word [ebp - 0xa14], ax
cmp word [ebp - 0xa18], 0
mov ecx, edx
push 0x5c
pop esi
je 0x408a8e
push 0x2f
lea eax, [ebp - 0xa18]
pop edi
cmp word [eax], di
jne 0x408a7f
mov word [eax], si
inc ecx
lea eax, [ebp - 0xa18]
lea eax, [eax + ecx*2]
cmp word [eax], dx
jne 0x408a77
cmp word [ebp + ecx*2 - 0xa1a], si
jne 0x408ae6
lea esi, [ebp - 0x1618]
mov ecx, esi
mov dword [ebp - 0xc518], ecx
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x408aa6
lea edi, [ebp - 0xa18]
sub esi, ecx
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, dx
jne 0x408abc
mov ecx, esi
mov dword [ebp - 0xc524], esi
mov esi, dword [ebp - 0xc518]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0xc524]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
movzx eax, word [ebp + ecx - 0xa18]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x121a], ax
test ax, ax
jne 0x408ae8
lea edi, [ebp - 0x1218]
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, dx
jne 0x408b09
mov esi, str..dul_
push str.Last_Modified:
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0xc528]
mov ecx, edi
call fcn.004082d1
lea edx, [ebp - 0x1a18]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x408b37
lea ecx, [ebp - 0x1a18]
call fcn.00407b36
lea ecx, [ebp - 0xa18]
mov dword [ebp - 0xc524], eax
mov dword [ebp - 0xc518], edx
call fcn.00407d28
push 0x30
mov esi, eax
mov dword [ebp - 0xc514], edx
lea eax, [ebp - 0x7a70]
push 0
push eax
call fcn.00413b90
mov eax, dword [ebp - 0xc514]
mov ecx, esi
add esp, 0xc
or ecx, eax
je 0x408cbd
cmp esi, dword [ebp - 0xc524]
jne 0x408cbd
cmp eax, dword [ebp - 0xc518]
jne 0x408cbd
lea eax, [ebp - 0x7a70]
push eax
lea eax, [ebp - 0xa18]
push eax
call fcn.00419ee1
pop ecx
pop ecx
test eax, eax
jne 0x408cbd
mov eax, dword [ebp - 0x7a5c]
cmp eax, dword [ebp - 0xc52c]
jne 0x408cbd
mov eax, dword [ebp - 0xc51c]
test eax, eax
je 0x408bf6
push str.File_exists__aborting
push 5
push dword [ebp - 0xc50c]
call eax
add esp, 0xc
cmp byte [ebp - 0xc506], 0
je 0x408d6e
xor eax, eax
lea ecx, [ebp - 0xc518]
push eax
push ecx
push eax
push 0x40
lea eax, [ebp - 0xa18]
push 0x8002
push eax
call fcn.0041b33c
mov ecx, dword [ebp - 0xc518]
or edx, 0xffffffff
test eax, eax
cmovne ecx, edx
push ecx
mov dword [ebp - 0xc524], ecx
call fcn.00417d08
mov edi, eax
add esp, 0x1c
lea esi, [edi + 1]
push esi
call fcn.00410dcb
pop ecx
push esi
push 0
push eax
mov dword [ebp - 0xc518], eax
call fcn.00413b90
mov esi, dword [ebp - 0xc524]
add esp, 0xc
push edi
mov edi, dword [ebp - 0xc518]
push edi
push esi
call fcn.00418d23
add esp, 0xc
push esi
call fcn.00419fd9
mov eax, dword [ebp - 0xc51c]
pop ecx
test eax, eax
je 0x408c9a
push edi
push 8
push dword [ebp - 0xc50c]
call eax
add esp, 0xc
neg al
sbb al, al
inc al
jmp 0x408ca0
mov al, byte [ebp - 0xc505]
test al, al
je 0x408cb1
lea eax, [ebp - 0xa18]
push eax
call fcn.0041bc9a
pop ecx
push edi
call fcn.00410df7
pop ecx
jmp 0x408d6e
and dword [ebp - 0xc520], 0
lea ecx, [ebp - 0x1218]
call fcn.00407d28
or eax, edx
je 0x408d1e
lea eax, [ebp - 0x7a70]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.00419ee1
pop ecx
pop ecx
test eax, eax
jne 0x408d1e
push eax
lea ecx, [ebp - 0xc514]
push ecx
push eax
push 0x40
lea eax, [ebp - 0x1218]
push 0x8002
push eax
call fcn.0041b33c
add esp, 0x18
or edx, 0xffffffff
test eax, eax
mov eax, dword [ebp - 0x7a5c]
mov dword [ebp - 0xc520], eax
jmp 0x408d54
lea eax, [ebp - 0x1218]
push eax
call fcn.0041bc9a
pop ecx
push 0
lea eax, [ebp - 0xc514]
push eax
push 0x180
push 0x40
lea eax, [ebp - 0x1218]
push 0x8302
push eax
call fcn.0041b33c
add esp, 0x18
or edx, 0xffffffff
test eax, eax
mov ecx, dword [ebp - 0xc514]
cmovne ecx, edx
mov dword [edi + 0xc], ecx
cmp ecx, edx
jne 0x408d79
mov dword [ebp - 0xc504], 0x3ea
mov esi, dword [ebp - 0xc510]
jmp 0x409266
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or eax, 2
push eax
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp - 0xc520]
mov esi, dword [ebp - 0xc510]
cmp eax, dword [ebp - 0xc52c]
jge 0x409087
xor eax, eax
lea ecx, [ebp - 0xc53c]
push eax
push dword [ebp - 0xc530]
push ecx
push eax
push eax
lea eax, [ebp - 0x2a18]
push eax
push 0x43ed48
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
push dword [ebp - 0xc520]
mov ebx, eax
lea eax, [ebp - 0x118]
push str.Range:_bytes_d__r_n
push eax
mov dword [ebp - 0xc534], ebx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x118]
add esp, 0xc
lea eax, [edx + 2]
xor ecx, ecx
mov dword [ebp - 0xc530], eax
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x408e08
sub edx, dword [ebp - 0xc530]
lea eax, [ebp - 0x118]
push ecx
push ecx
sar edx, 1
push edx
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x408eb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f19
jne 0x408e95
lea eax, [ebp - 0xc530]
mov dword [ebp - 0xc530], 4
push eax
lea eax, [ebp - 0xc504]
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0xc504], 0x80
lea eax, [ebp - 0xc504]
push 4
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
xor eax, eax
push eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x408eb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408eb5
push dword [edi + 0xc]
call fcn.00419fd9
or dword [edi + 0xc], 0xffffffff
pop ecx
mov dword [ebp - 0xc504], 0x453
jmp 0x409266
push ebx
mov ecx, edi
call fcn.004083a3
mov ecx, edi
call fcn.0040833d
push 0x13
push ebx
call fcn.00408250
add eax, 0xffffff38
cmp eax, 0x64
jb 0x408f0e
mov eax, dword [ebp - 0xc51c]
test eax, eax
je 0x408ef2
push str.Sould_be__2xx_
push 5
push dword [ebp - 0xc50c]
call eax
add esp, 0xc
push dword [edi + 0xc]
call fcn.00419fd9
or dword [edi + 0xc], 0xffffffff
pop ecx
mov dword [ebp - 0xc504], 0x455
jmp 0x409266
push str.Content_Range:_bytes
mov ecx, edi
call fcn.004082d1
lea edx, [ebp - 0x118]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
lea eax, [eax + 2]
test cx, cx
jne 0x408f22
lea eax, [ebp - 0x118]
push eax
call fcn.004187e7
mov esi, dword [ebp - 0xc528]
xor edi, edi
pop ecx
push edi
push eax
push dword [esi + 0xc]
mov dword [ebp - 0xc520], eax
call fcn.0041ad16
and dword [ebp - 0xc514], edi
lea ecx, [ebp - 0x7a24]
add esp, 0xc
push 0x2800
call fcn.00409286
mov edi, dword [ebp - 0xc51c]
mov byte [ebp - 4], 2
lea eax, [ebp - 0xc514]
push eax
push 0x2800
push dword [ebp - 0x7a24]
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x408f9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc514], 0
je 0x408fe7
push dword [ebp - 0xc514]
push dword [ebp - 0x7a24]
push dword [esi + 0xc]
call fcn.0041a684
mov eax, dword [ebp - 0xc514]
add esp, 0xc
add dword [ebp - 0xc520], eax
test edi, edi
je 0x408fe0
lea eax, [ebp - 0xc520]
push eax
push 4
push dword [ebp - 0xc50c]
call edi
add esp, 0xc
mov al, byte [esi + 0x10]
test al, al
je 0x408f79
mov eax, dword [ebp - 0xc520]
mov esi, dword [ebp - 0xc510]
cmp eax, dword [ebp - 0xc52c]
je 0x40906c
test edi, edi
je 0x409011
push str.Error_during_downloading__network_error
push 5
push dword [ebp - 0xc50c]
call edi
add esp, 0xc
mov edi, dword [ebp - 0xc528]
push dword [ebp - 0xc520]
push dword [edi + 0xc]
call fcn.0041ba2a
push dword [edi + 0xc]
call fcn.00419fd9
or dword [edi + 0xc], 0xffffffff
lea eax, [ebp - 0x1218]
add esp, 0xc
push eax
call fcn.0041bc9a
cmp byte [edi + 0x10], 0
pop ecx
je 0x409052
mov eax, dword [edi + 0x14]
mov dword [ebp - 0xc504], eax
jmp 0x40905c
mov dword [ebp - 0xc504], 0x457
lea ecx, [ebp - 0x7a24]
call fcn.004092cd
jmp 0x409266
lea ecx, [ebp - 0x7a24]
mov byte [ebp - 4], 1
call fcn.004092cd
mov eax, dword [ebp - 0xc520]
mov edi, dword [ebp - 0xc528]
push eax
push dword [edi + 0xc]
call fcn.0041ba2a
push dword [edi + 0xc]
call fcn.00419fd9
mov eax, dword [ebp - 0xc518]
add esp, 0xc
mov ecx, dword [ebp - 0xc524]
mov dword [ebp - 0x7a24], eax
mov dword [ebp - 0x7a1c], eax
lea eax, [ebp - 0x7a28]
push eax
lea eax, [ebp - 0x1218]
mov dword [ebp - 0x7a28], ecx
push eax
mov dword [ebp - 0x7a20], ecx
call fcn.00417bed
or dword [edi + 0xc], 0xffffffff
lea eax, [ebp - 0xa18]
push eax
call fcn.0041bc9a
add esp, 0xc
lea eax, [ebp - 0xa18]
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.0041a9a0
pop ecx
pop ecx
test eax, eax
je 0x409148
push 0
lea eax, [ebp - 0xa18]
push eax
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x409148
call fcn.0040146e
mov eax, dword [ebp - 0xc51c]
test eax, eax
je 0x409139
push str.Error_during_renaming_or_copying_tmp_file
push 5
push dword [ebp - 0xc50c]
call eax
add esp, 0xc
mov dword [ebp - 0xc504], 0x3e9
jmp 0x409266
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0xfffffffd
push eax
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
mov dword [ebp - 0x7a24], eax
mov dword [ebp - 0x7a20], eax
mov dword [ebp - 0x7a1c], eax
lea eax, [ebp - 0xa18]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x7a40]
call fcn.00402058
push ecx
lea edx, [ebp - 0x7a24]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x7a40]
call fcn.0040d2e4
pop ecx
test eax, eax
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x7a40]
setne byte [ebp - 0xc506]
call fcn.00402089
cmp byte [ebp - 0xc506], 0
jne 0x409244
mov eax, dword [ebp - 0x7a24]
cmp byte [eax], 0x4d
jne 0x409244
cmp byte [eax + 1], 0x5a
jne 0x409244
cmp byte [eax + 2], 0x90
jne 0x409244
mov eax, dword [ebp - 0xc51c]
test eax, eax
je 0x409201
lea ecx, [ebp - 0xc52c]
push ecx
push 9
push dword [ebp - 0xc50c]
call eax
add esp, 0xc
lea ecx, [ebp - 0x7a24]
call fcn.004092cd
test ebx, ebx
je 0x409217
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor ebx, ebx
test esi, esi
je 0x409224
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, ebx
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.004107d5
mov esp, ebp
pop ebp
ret 0x10
lea eax, [ebp - 0xa18]
push eax
call fcn.0041bc9a
pop ecx
lea ecx, [ebp - 0x7a24]
call fcn.004092cd
mov dword [ebp - 0xc504], 0x44f
test ebx, ebx
je 0x409271
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [ebp - 0xc504]
jmp 0x409219
mov esi, dword [ebp - 0xc510]
jmp 0x409219