Function at 0x423c4f
Capabilities:
Check http status code
Link many functions at runtime
Write file on windows

Disassembly:
push ebp
mov eax, 0x297c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00487b00
xor edi, edi
mov ecx, 0xe
sub esp, eax
xor eax, eax
mov dword [ebp - 0x2938], edi
lea edi, [ebp - 0x2910]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x28d8]
mov ebx, dword [ebp + 8]
cmp dword [0x523b64], 0
mov dword [ebp - 0x2904], eax
lea eax, [ebp - 0x2898]
mov dword [ebp - 0x293c], 0x4a1e1c
mov dword [ebp - 0x2914], 0x3c
mov dword [ebp - 0x290c], 1
mov dword [ebp - 0x2900], 0x40
mov dword [ebp - 0x28f4], 1
mov dword [ebp - 0x28f0], eax
mov dword [ebp - 0x28ec], pe_nt_image_headers32
mov dword [ebp - 0x28e4], 1
jne 0x423d4d
call fcn.00423487
mov dword [esp + 4], str.InternetCrackUrlA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push esi
push esi
mov dword [0x523b64], eax
test eax, eax
jne 0x423d4d
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.InternetCrackUrlA
mov dword [esp], 0x4a1cec
call fcn.0043efa9
xor ebx, ebx
mov dword [ebp - 0x2950], ebx
mov dword [ebp - 0x294c], ebx
mov dword [ebp - 0x2954], ebx
mov dword [ebp - 0x2964], ebx
mov dword [ebp - 0x2960], ebx
jmp 0x424152
cmp dword [0x523b60], 0
jne 0x423d92
call fcn.00423487
mov dword [esp + 4], str.InternetConnectA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push ecx
push ecx
mov dword [0x523b60], eax
test eax, eax
jne 0x423d92
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.InternetConnectA
jmp 0x423d1c
cmp dword [0x523b5c], 0
jne 0x423dda
call fcn.00423487
mov dword [esp + 4], str.InternetReadFile
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push edx
push edx
mov dword [0x523b5c], eax
test eax, eax
jne 0x423dda
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.InternetReadFile
jmp 0x423d1c
cmp dword [0x523b58], 0
jne 0x423e22
call fcn.00423487
mov dword [esp + 4], str.InternetCloseHandle
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push edi
push edi
mov dword [0x523b58], eax
test eax, eax
jne 0x423e22
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.InternetCloseHandle
jmp 0x423d1c
cmp dword [0x523b54], 0
jne 0x423e6a
call fcn.00423487
mov dword [esp + 4], str.HttpOpenRequestA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push esi
push esi
mov dword [0x523b54], eax
test eax, eax
jne 0x423e6a
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.HttpOpenRequestA
jmp 0x423d1c
cmp dword [0x523b50], 0
jne 0x423eb2
call fcn.00423487
mov dword [esp + 4], str.HttpSendRequestA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push ecx
push ecx
mov dword [0x523b50], eax
test eax, eax
jne 0x423eb2
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.HttpSendRequestA
jmp 0x423d1c
cmp dword [0x523b4c], 0
jne 0x423efa
call fcn.00423487
mov dword [esp + 4], str.HttpQueryInfoA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push edx
push edx
mov dword [0x523b4c], eax
test eax, eax
jne 0x423efa
call fcn.0043f53d
mov dword [esp + 8], str.WinInet
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.HttpQueryInfoA
jmp 0x423d1c
mov dword [0x523a68], 0x194
xor eax, eax
cmp dword [ebp + 0x18], 0
mov dword [0x4e2900], eax
je 0x423f3c
xor edi, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0x18]
mov dword [esp], 0xffffffff
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 4], eax
call fcn.0044d5f3
test ebx, ebx
jne 0x423f5d
mov dword [esp + 8], 0xd4
mov dword [esp + 4], str.net.c
mov dword [esp], str.url___NULL
call dword [0x494088]
cmp dword [ebp + 0x14], 0
je 0x423f6a
mov eax, dword [ebp + 0x14]
xor esi, esi
mov dword [eax], esi
cmp dword [ebp + 0xc], 0
mov eax, ebx
je 0x423f75
mov eax, dword [ebp + 0xc]
call fcn.004231d4
cmp dword [ebp + 0x18], 0
mov dword [ebp - 0x2968], eax
je 0x423fc2
mov eax, dword [ebp - 0x2968]
xor ecx, ecx
mov dword [esp + 0xc], 0xc0d
mov dword [esp + 8], 0x1388
mov dword [esp + 0x10], eax
mov dword [esp + 4], ecx
mov dword [esp], 1
call fcn.00422ac2
mov dword [esp + 4], ebx
mov dword [esp], str.Downloading__s
call fcn.0043efa9
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
lea edx, [ebp - 0x2914]
mov dword [esp], ebx
mov dword [esp + 0xc], edx
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call dword [0x523b64]
sub esp, 0x10
test eax, eax
je 0x424000
cmp dword [ebp - 0x2904], 0
je 0x424000
cmp dword [ebp - 0x28e8], 0
jne 0x424012
call fcn.0043f53d
mov dword [esp], str.Unable_to_decode_URL:__s
mov dword [esp + 4], eax
jmp 0x424040
mov eax, dword [ebp + 0x10]
mov edx, 1
mov byte [ebp - 0x2899], 0
call fcn.004235a4
mov dword [ebp - 0x2960], eax
test eax, eax
jne 0x42404a
call fcn.0043f53d
mov dword [esp], str.Could_not_open_Internet_session:__s
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x423d28
xor esi, esi
xor edi, edi
mov dword [esp + 0x14], 3
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edi
movzx eax, word [ebp - 0x28fc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2904]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2960]
mov dword [esp], eax
call dword [0x523b60]
mov dword [ebp - 0x2964], eax
sub esp, 0x20
test eax, eax
jne 0x4240cb
call fcn.0043f53d
xor ebx, ebx
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x28fc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2904]
mov dword [esp], str.Could_not_connect_to_server__s:_d:__s
mov dword [esp + 4], eax
call fcn.0043efa9
mov dword [ebp - 0x2954], ebx
jmp 0x424144
cmp dword [ebp - 0x2908], 4
mov edx, 0x488c600
mov eax, 0x408c600
cmove eax, edx
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x293c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov eax, dword [ebp - 0x28e8]
mov dword [esp + 4], 0x4a1f30
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2964]
mov dword [esp], eax
call dword [0x523b54]
mov dword [ebp - 0x2954], eax
sub esp, 0x20
test eax, eax
jne 0x42415a
call fcn.0043f53d
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], str.Could_not_open_URL__s:__s
call fcn.0043efa9
xor eax, eax
mov dword [ebp - 0x2950], eax
mov dword [ebp - 0x294c], eax
or ebx, 0xffffffff
jmp 0x4245de
xor eax, eax
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov dword [esp + 4], str.Accept_Encoding:_gzip__deflate
mov eax, dword [ebp - 0x2954]
mov dword [esp], eax
call dword [0x523b50]
sub esp, 0x14
test eax, eax
jne 0x42419f
call fcn.0043f53d
mov dword [esp], str.Unable_to_send_request:__s
mov dword [esp + 4], eax
jmp 0x424278
xor eax, eax
lea esi, [ebp - 0x2948]
mov dword [ebp - 0x2948], 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x523a68
mov dword [esp + 4], 0x20000013
mov eax, dword [ebp - 0x2954]
mov dword [esp], eax
call dword [0x523b4c]
sub esp, 0x14
cmp dword [0x523a68], 0xc8
je 0x42422c
mov dword [0x523b70], 0x2efc
mov dword [esp], 0xc0192efc
call dword [sym.imp.KERNEL32.DLL_SetLastError]
mov ecx, str.File_not_found
push eax
mov edx, dword [0x523a68]
mov eax, str.Unable_to_access_file
cmp edx, 0x194
cmove eax, ecx
mov dword [esp + 8], edx
mov dword [esp], str._s:__d
mov dword [esp + 4], eax
jmp 0x42413f
mov dword [ebp - 0x2948], 0x20
xor eax, eax
mov dword [esp + 0xc], esi
lea esi, [ebp - 0x2934]
mov dword [esp + 0x10], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 5
mov eax, dword [ebp - 0x2954]
mov dword [esp], eax
call dword [0x523b4c]
sub esp, 0x14
test eax, eax
jne 0x424282
call fcn.0043f53d
mov dword [esp], str.Unable_to_retrieve_file_length:__s
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x424144
xor edi, edi
mov dword [esp + 8], 0xa
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll__strtoui64
cmp dword [ebp + 0x18], 0
mov dword [ebp - 0x295c], eax
mov dword [ebp - 0x2958], edx
je 0x42439b
xor ecx, ecx
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.0043f9fb
mov dword [esp], str.File_length:__s
mov dword [esp + 4], eax
call fcn.0043efa9
cmp dword [0x526cd4], 0
je 0x42431a
mov eax, ebx
call fcn.0042320a
mov ebx, eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x295c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2958]
mov dword [esp + 4], eax
call fcn.0043f9fb
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4a1fc2
jmp 0x424355
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x295c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2958]
mov dword [esp + 4], eax
call fcn.0043f9fb
mov esi, eax
mov eax, ebx
call fcn.0042320a
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4a1fca
lea eax, [ebp - 0x2818]
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__snprintf]
lea eax, [ebp - 0x2818]
mov byte [ebp - 0x2799], 0
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], 0xc0d
mov dword [esp + 8], 0x1388
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.00422ac2
cmp dword [ebp + 0xc], 0
je 0x4243d9
mov eax, dword [ebp + 0xc]
mov ecx, pe_nt_image_headers32
mov edx, 0xc0000000
call fcn.00423419
mov ebx, eax
cmp eax, 0xffffffff
jne 0x42441c
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2968]
mov dword [esp], str.Unable_to_create_file__s:__s
mov dword [esp + 4], eax
jmp 0x42413f
cmp dword [ebp + 0x14], 0
jne 0x4243e8
mov dword [esp], str.No_buffer_pointer_provided_for_download
jmp 0x424412
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x295c]
or ebx, 0xffffffff
inc eax
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov edi, dword [ebp + 0x14]
mov dword [edi], eax
test eax, eax
jne 0x42441c
mov dword [esp], str.Could_not_allocate_buffer_for_download
call fcn.0043efa9
jmp 0x424144
xor eax, eax
mov dword [ebp - 0x2950], eax
mov dword [ebp - 0x294c], eax
cmp dword [0x4e2900], 0
js 0x4245de
lea eax, [ebp - 0x2940]
mov dword [esp + 8], 0x2800
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2818]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2954]
mov dword [esp], eax
call dword [0x523b5c]
sub esp, 0x10
test eax, eax
je 0x424584
cmp dword [ebp - 0x2940], 0
je 0x424584
cmp dword [ebp + 0x18], 0
je 0x4244c2
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x295c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2958]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2950]
mov edx, dword [ebp - 0x294c]
mov dword [esp + 4], 0xca9
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp], 0xfffffffe
call fcn.0044d5f3
cmp dword [ebp + 0xc], 0
mov ecx, dword [ebp - 0x2940]
je 0x424557
lea eax, [ebp - 0x2944]
xor edi, edi
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2818]
mov dword [esp + 0x10], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
sub esp, 0x14
test eax, eax
jne 0x424524
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2968]
mov dword [esp], str.Error_writing_file__s:__s
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x4245de
mov edx, dword [ebp - 0x2940]
mov eax, dword [ebp - 0x2944]
cmp edx, eax
je 0x42456c
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2968]
mov dword [esp], str.Error_writing_file__s:_Only__d__d_bytes_written
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x4245de
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp - 0x2950]
lea esi, [ebp - 0x2818]
add eax, dword [edi]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x2940]
add dword [ebp - 0x2950], eax
adc dword [ebp - 0x294c], 0
jmp 0x42442a
mov eax, dword [ebp - 0x2958]
cmp dword [ebp - 0x294c], eax
jne 0x4245a0
mov eax, dword [ebp - 0x295c]
cmp dword [ebp - 0x2950], eax
je 0x4245e5
mov eax, dword [ebp - 0x295c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2958]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2950]
mov edx, dword [ebp - 0x294c]
mov dword [esp], str.Could_not_download_complete_file___read:__lld_bytes__expected:__lld_bytes
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0043efa9
mov dword [0x4e2900], 0xc003001d
xor esi, esi
jmp 0x42466a
mov dword [0x523a68], 0xc8
cmp dword [ebp + 0x18], 0
je 0x42464d
xor esi, esi
mov dword [esp + 0x18], esi
mov eax, dword [ebp - 0x2950]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x2958]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2950]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2958]
mov dword [esp + 4], 0xca9
mov dword [esp + 0xc], eax
mov dword [esp], 0xfffffffe
call fcn.0044d5f3
mov eax, dword [ebp - 0x2968]
mov dword [esp], str.Successfully_downloaded__s
mov dword [esp + 4], eax
call fcn.0043efa9
mov eax, dword [ebp - 0x295c]
mov esi, 1
mov dword [ebp - 0x2950], eax
mov eax, dword [ebp - 0x2958]
mov dword [ebp - 0x294c], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x523b70], eax
cmp ebx, 0xffffffff
je 0x42468e
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
push ecx
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push ebx
test esi, esi
jne 0x4246ba
cmp dword [ebp + 0xc], 0
je 0x4246a0
mov eax, dword [ebp + 0xc]
call fcn.00423be4
cmp dword [ebp + 0x14], 0
je 0x4246ba
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp + 0x14]
xor edx, edx
mov dword [eax], edx
cmp dword [ebp - 0x2954], 0
je 0x4246d3
mov eax, dword [ebp - 0x2954]
mov dword [esp], eax
call dword [0x523b58]
push edi
cmp dword [ebp - 0x2964], 0
je 0x4246ec
mov eax, dword [ebp - 0x2964]
mov dword [esp], eax
call dword [0x523b58]
push ebx
cmp dword [ebp - 0x2960], 0
je 0x424705
mov eax, dword [ebp - 0x2960]
mov dword [esp], eax
call dword [0x523b58]
push ecx
mov eax, dword [0x523b70]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push edx
test esi, esi
jne 0x424726
xor eax, eax
mov dword [ebp - 0x2950], eax
mov dword [ebp - 0x294c], eax
mov eax, dword [ebp - 0x2950]
mov edx, dword [ebp - 0x294c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret