Function at 0x100089f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
mov esi, ecx
push ebx
mov ebx, edx
sub esp, 0x88
test byte [0x10047174], 8
jne 0x10008b50
mov dword [esp], 0
call sym._INTERNET_SetLastError
mov dword [esp], ebx
xor ebx, ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebp - 0x54], eax
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x10008afe
mov eax, dword [edi + 0x40]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [ebp - 0x5c], eax
mov dword [esp + 8], 0x1e
mov eax, dword [edi + 0x14]
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._INTERNET_SendCallback
mov ecx, dword [ebp + 8]
mov edx, esi
mov eax, edi
call sym._FTP_SendStore
mov ebx, eax
test eax, eax
jne 0x10008b30
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
jne 0x10008b10
mov eax, dword [ebp - 0x5c]
test byte [eax + 0x13], 0x10
je 0x10008aef
mov dword [ebp - 0x40], ebx
xor eax, eax
test ebx, ebx
je 0x10008db0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
mov dword [esp + 0x10], 8
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x64
mov eax, dword [edi + 0x14]
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._INTERNET_SendCallback
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_closesocket]
mov eax, dword [ebp - 0x5c]
mov dword [edi + 0x48], 0xffffffff
sub esp, 4
test byte [eax + 0x13], 0x10
je 0x10008aef
jmp 0x10008ab9
lea edx, [ebp - 0x50]
mov eax, edi
call sym._FTP_GetDataSocket
test eax, eax
jne 0x10008b98
xor ebx, ebx
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
je 0x10008ab0
jmp 0x10008b10
mov eax, ecx
call sym._wine_dbgstr_wn.constprop.0_1
mov dword [ebp - 0x54], eax
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0_1
mov edx, dword [ebp - 0x54]
mov dword [esp + 0xc], str._lpszLocalFile__s__lpszNewRemoteFile__s__n
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 8], str.FTP_FtpPutFileW
mov dword [esp + 4], 0x10047174
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x10008a0f
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x60], eax
test byte [0x10047174], 8
jne 0x10008ea8
mov dword [esp + 4], 1
xor esi, esi
mov dword [esp], 0x2000
call dword [sym.imp.ucrtbase.dll_calloc]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x40]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileInformationByHandle]
lea eax, [ebp - 0x48]
sub esp, 8
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__time32]
mov dword [ebp - 0x64], eax
call eax
xor eax, eax
mov dword [ebp - 0x6c], edi
mov edi, eax
jmp 0x10008c16
test byte [0x10047174], 8
jne 0x10008d20
cmp ebx, 0xffffffff
je 0x10008df0
mov eax, dword [ebp - 0x4c]
sub eax, esi
jne 0x10008c68
lea eax, [ebp - 0x4c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x10008c5b
test byte [0x10047174], 2
jne 0x10008dc0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x10008df0
xor esi, esi
cmp eax, 0x2000
mov edx, 0x2000
mov dword [esp + 0xc], 0
cmova eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call sym._sock_send
mov ebx, eax
cmp eax, 0xffffffff
je 0x10008c9e
add esi, eax
add edi, eax
lea eax, [ebp - 0x44]
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
mov ecx, dword [ebp - 0x44]
sub ecx, dword [ebp - 0x48]
cmp ecx, 0x3b
jg 0x10008c00
test byte [0x10047174], 8
je 0x10008c0d
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], edi
sub eax, edi
mov dword [esp + 0xc], str._ld_bytes_of__ld_bytes___ld____in__ld_sec_estimated_remaining_time__ld_sec_n
imul eax, ecx
mov dword [esp + 8], str.FTP_SendData
mov dword [esp + 4], 0x10047174
mov dword [esp], 3
div edi
xor edx, edx
mov dword [esp + 0x20], eax
imul eax, edi, 0x64
div dword [ebp - 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], eax
call sym._wine_dbg_log.constprop.0_2
jmp 0x10008c0d
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str._ld_bytes_of__ld_bytes___ld____in__ld_min__ld_sec_estimated_remaining_time__ld_sec_n
sub eax, edi
mov dword [esp + 8], str.FTP_SendData
imul eax, ecx
mov dword [esp + 4], 0x10047174
mov dword [esp], 3
div edi
mov dword [esp + 0x24], eax
mov eax, 0x88888889
imul ecx
lea eax, [ecx + edx]
mov edx, ecx
sar edx, 0x1f
sar eax, 5
sub eax, edx
mov dword [ebp - 0x68], edx
mov edx, ecx
imul eax, eax, 0x3c
sub edx, eax
mov eax, 0x88888889
mov dword [esp + 0x20], edx
imul ecx
lea eax, [edx + ecx]
xor edx, edx
sar eax, 5
sub eax, dword [ebp - 0x68]
mov dword [esp + 0x1c], eax
imul eax, edi, 0x64
div dword [ebp - 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], eax
call sym._wine_dbg_log.constprop.0_2
jmp 0x10008c0d
call sym._INTERNET_GetLastError
jmp 0x10008ac6
mov dword [esp + 0xc], str.Failed_reading_from_file_n
mov dword [esp + 8], str.FTP_SendData
mov dword [esp + 4], 0x10047174
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_2
jmp 0x10008c5b
mov edi, dword [ebp - 0x6c]
test byte [0x10047174], 8
jne 0x10008e78
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_closesocket]
mov edx, dword [ebp + 0xc]
mov eax, edi
sub esp, 4
call sym._FTP_ReceiveResponse
test eax, eax
je 0x10008b3e
mov ebx, 1
cmp eax, 0xe2
je 0x10008aa8
mov edx, 0x2efe
cmp eax, 0x1aa
je 0x10008e63
mov edx, 0x2eef
cmp eax, 0x212
je 0x10008e63
cmp eax, 0x1a9
mov edx, 0x2ee3
mov eax, 0x2efd
cmove edx, eax
mov dword [esp], edx
xor ebx, ebx
call sym._INTERNET_SetLastError
jmp 0x10008b40
mov dword [esp + 0xc], str.file_transfer_complete__n
mov dword [esp + 8], str.FTP_SendData
mov dword [esp + 4], 0x10047174
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x10008dfc
mov dword [esp + 0xc], 0x10049824
mov dword [esp + 8], str.FTP_SendData
mov dword [esp + 4], 0x10047174
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x10008bb2