Function at 0x10007806
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], 0x186a0
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], ebx
cmp byte [ebp + 8], bl
je 0x10007866
mov edx, 0x10061d80
lea ecx, [ebp + 0x24]
call fcn.10008048
test al, al
je 0x10007866
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.10007c8e
lea ecx, [ebp - 0xa4]
call fcn.1001833b
add esp, 0x18
lea ecx, [ebp + 0x24]
push eax
call fcn.10001e35
lea ecx, [ebp - 0xa4]
call fcn.10001e30
mov ecx, edi
call fcn.1000423b
push ecx
mov ecx, edi
call fcn.100042d6
sub esp, 0x18
lea edx, [ebp + 0x24]
lea ecx, [ebp - 0x5c]
mov esi, esp
call fcn.10018b1c
push eax
mov ecx, 0x10070ea8
lea eax, [ebp + 0x3c]
push ecx
push eax
push ecx
lea edx, [ebp + 0xc]
lea ecx, [ebp - 0x8c]
call fcn.10018b1c
mov edx, eax
lea ecx, [ebp - 0x74]
call fcn.10002821
pop ecx
mov edx, eax
lea ecx, [ebp - 0xbc]
call fcn.10002821
pop ecx
mov edx, eax
lea ecx, [ebp - 0xa4]
call fcn.10002821
pop ecx
mov edx, eax
mov ecx, esi
call fcn.100027a9
pop ecx
push 0xb6
mov ecx, edi
call fcn.100044b2
lea ecx, [ebp - 0xa4]
mov esi, eax
call fcn.10001f0f
lea ecx, [ebp - 0xbc]
call fcn.10001f0f
lea ecx, [ebp - 0x74]
call fcn.10001f0f
lea ecx, [ebp - 0x8c]
call fcn.10001f0f
lea ecx, [ebp - 0x5c]
call fcn.10001f0f
cmp esi, 0xffffffff
je 0x10007957
push ebx
push 0x80
push 3
xor eax, eax
lea ecx, [ebp + 0xc]
push ebx
inc eax
push eax
push connect
mov dword [ebp - 0x3c], eax
call fcn.10001e24
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10007984
sub esp, 0x18
mov ecx, esp
push 0x10061c24
call fcn.10001f8b
push 0x53
mov ecx, edi
call fcn.100044b2
mov ecx, edi
call fcn.10004816
mov byte [ebp - 0x3c], 0
lea ecx, [ebp + 0xc]
call fcn.10001e30
lea ecx, [ebp + 0x24]
call fcn.10001e30
lea ecx, [ebp + 0x3c]
call fcn.10001f0f
mov al, byte [ebp - 0x3c]
pop edi
pop esi
pop ebx
leave
ret 0x4c
and dword [ebp - 0x44], 0
lea eax, [ebp - 0x44]
and dword [ebp - 0x40], 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov edx, dword [ebp - 0x40]
mov eax, 0x186a0
mov ecx, dword [ebp - 0x44]
xor esi, esi
and dword [ebp - 0x14], 0
inc esi
push 0
push eax
push edx
push ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x10], esi
call fcn.10051700
add eax, esi
lea ecx, [ebp - 0x74]
adc edx, 0
sub esp, 0x18
mov esi, esp
push edx
push eax
call fcn.100189d1
pop ecx
pop ecx
push eax
push 0x10070ea8
push dword [ebp - 0x20]
lea ecx, [ebp - 0x8c]
push dword [ebp + 8]
call fcn.100189d1
pop ecx
pop ecx
mov edx, eax
lea ecx, [ebp - 0x5c]
call fcn.10002821
pop ecx
mov edx, eax
mov ecx, esi
call fcn.100027a9
pop ecx
push 0xb7
mov ecx, edi
call fcn.100044b2
lea ecx, [ebp - 0x5c]
call fcn.10001f0f
lea ecx, [ebp - 0x8c]
call fcn.10001f0f
lea ecx, [ebp - 0x74]
call fcn.10001f0f
sub esp, 0x18
lea edx, [ebp + 0xc]
lea ecx, [ebp - 0x5c]
mov esi, esp
call fcn.10018abd
push eax
mov edx, str.Uploading_file_to_Controller:
mov ecx, esi
call fcn.10004cc7
sub esp, 0x14
mov ecx, esp
push 0x10061b24
call fcn.10001f8b
call fcn.100183fa
add esp, 0x30
lea ecx, [ebp - 0x5c]
call fcn.10001f0f
mov edx, dword [ebp - 0x20]
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
test edx, edx
jb 0x10007ba5
mov eax, dword [ebp + 8]
ja 0x10007a83
test eax, eax
je 0x10007ba5
mov ecx, eax
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
mov eax, 0x186a0
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 8], edx
jb 0x10007aaf
ja 0x10007aa7
cmp eax, ecx
jbe 0x10007aaf
mov eax, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], eax
push eax
call fcn.100015f5
pop ecx
mov esi, eax
xor eax, eax
push eax
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x28], esi
push dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x10007c09
push 0
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0xc]
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x18
test eax, eax
je 0x10007bd4
mov esi, esp
lea ecx, [ebp - 0x74]
push dword [ebp - 0x30]
push dword [ebp - 0x28]
call fcn.10001fae
push eax
push 0x10070ea8
push dword [ebp - 0x14]
lea ecx, [ebp - 0x8c]
push dword [ebp - 0x10]
call fcn.100189d1
pop ecx
pop ecx
mov edx, eax
lea ecx, [ebp - 0x5c]
call fcn.10002821
pop ecx
mov edx, eax
mov ecx, esi
call fcn.100027a9
pop ecx
push 0x52
mov ecx, edi
call fcn.100044b2
lea ecx, [ebp - 0x5c]
mov esi, eax
call fcn.10001f0f
lea ecx, [ebp - 0x8c]
call fcn.10001f0f
lea ecx, [ebp - 0x74]
call fcn.10001f0f
cmp esi, 0xffffffff
je 0x10007bb8
push dword [ebp - 0x28]
call fcn.10030a94
mov eax, dword [ebp - 0xc]
sub dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x38]
sbb edx, dword [ebp - 8]
add dword [ebp - 0x10], 1
mov esi, dword [ebp - 0x18]
adc dword [ebp - 0x14], 0
add esi, eax
pop ecx
mov ecx, dword [ebp - 0x1c]
adc ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x18], esi
jb 0x10007a9c
ja 0x10007ba5
cmp esi, dword [ebp + 8]
jb 0x10007a9c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
call fcn.10004816
jmp 0x10007962
mov ecx, edi
call fcn.10004816
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x28]
call fcn.10030a94
pop ecx
jmp 0x1000795e
mov ecx, esp
push str.ReadFile_error
call fcn.10001f8b
sub esp, 0x18
mov ecx, esp
push 0x10061a88
call fcn.10001f8b
call fcn.100183fa
push esi
call fcn.10030a94
add esp, 0x34
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10007957
sub esp, 0x18
mov ecx, esp
push str.SetFilePointerEx_error
jmp 0x10007bdb