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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d0
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x3c], esi
call fcn.00404943
push ecx
mov ecx, esi
call fcn.004049de
xor ebx, ebx
mov dword [ebp - 0x1c], 0x186a0
push ebx
push 0x80
push 3
push ebx
push 1
push connect
push dword [ebp + 8]
mov dword [ebp - 0x38], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4066a8
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.004020de
push 0x53
mov ecx, 0x46e318
call fcn.00404bb7
jmp 0x406a91
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], ebx
push eax
push edi
mov dword [ebp - 0x40], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x44]
push dword [ebp + 8]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0xc], eax
call fcn.00404260
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x7c]
call fcn.00417d2b
sub esp, 0x18
mov edx, str.Uploading_file_to_Controller:
mov ecx, esp
push eax
call fcn.004053f2
sub esp, 0x14
mov ecx, esp
push 0x460638
call fcn.00402076
call fcn.00417670
add esp, 0x30
lea ecx, [ebp - 0x7c]
call fcn.00401fb9
lea ecx, [ebp - 0x64]
call fcn.00401ee2
push ebx
mov eax, 0x186a0
mov dword [ebp - 0x20], 1
push eax
push dword [ebp - 0x28]
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x2c]
call fcn.00451a20
add eax, 1
mov ecx, edx
xorps xmm0, xmm0
mov dword [ebp - 0x4c], eax
adc ecx, ebx
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x48], ecx
cmp dword [ebp - 0x28], ebx
jb 0x4069e6
ja 0x40675d
cmp dword [ebp - 0x2c], ebx
jbe 0x4069e6
mov eax, dword [ebp - 0x30]
mov edx, ebx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov eax, 0x186a0
cmp edx, dword [ebp - 0x10]
jb 0x406789
mov ecx, dword [ebp - 0xc]
ja 0x40677e
cmp eax, ecx
jbe 0x406789
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x38], ecx
push eax
call fcn.0043021b
pop ecx
push ebx
push ebx
push dword [ebp - 0x14]
mov dword [ebp - 8], eax
push dword [ebp - 0x30]
mov dword [ebp - 0x18], ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x406a5c
push ebx
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406a50
cmp dword [ebp - 0x18], 0
je 0x406a34
push dword [ebp + 8]
lea ecx, [ebp - 0x64]
call fcn.00404260
push dword [ebp - 0x18]
lea ecx, [ebp - 0x1cc]
push dword [ebp - 8]
call fcn.0040209d
sub esp, 0x18
lea ecx, [ebp - 0x1b4]
mov esi, esp
mov ebx, 0x46e250
push eax
push ebx
lea eax, [ebp + 0x3c]
push eax
push ebx
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
call fcn.00417c50
pop ecx
pop ecx
push eax
push ebx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x19c]
push dword [ebp - 0x20]
call fcn.00417c50
pop ecx
pop ecx
push eax
push ebx
lea eax, [ebp + 0x24]
push eax
push ebx
lea eax, [ebp + 0xc]
push eax
push ebx
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x184]
call fcn.00417d8c
mov edx, eax
lea ecx, [ebp - 0x16c]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0x154]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0x13c]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0x124]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0x10c]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0xf4]
call fcn.00402f0f
pop ecx
mov edx, eax
lea ecx, [ebp - 0xdc]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0xc4]
call fcn.00402f0f
pop ecx
mov edx, eax
lea ecx, [ebp - 0xac]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0x94]
call fcn.00402f85
pop ecx
mov edx, eax
lea ecx, [ebp - 0x7c]
call fcn.00402f85
pop ecx
mov edx, eax
mov ecx, esi
call fcn.00402f0f
mov esi, dword [ebp - 0x3c]
pop ecx
push 0x52
mov ecx, esi
call fcn.00404bb7
cmp eax, 0xffffffff
lea ecx, [ebp - 0x7c]
sete bl
call fcn.00401fb9
lea ecx, [ebp - 0x94]
call fcn.00401fb9
lea ecx, [ebp - 0xac]
call fcn.00401fb9
lea ecx, [ebp - 0xc4]
call fcn.00401fb9
lea ecx, [ebp - 0xdc]
call fcn.00401fb9
lea ecx, [ebp - 0xf4]
call fcn.00401fb9
lea ecx, [ebp - 0x10c]
call fcn.00401fb9
lea ecx, [ebp - 0x124]
call fcn.00401fb9
lea ecx, [ebp - 0x13c]
call fcn.00401fb9
lea ecx, [ebp - 0x154]
call fcn.00401fb9
lea ecx, [ebp - 0x16c]
call fcn.00401fb9
lea ecx, [ebp - 0x184]
call fcn.00401fb9
lea ecx, [ebp - 0x19c]
call fcn.00401fb9
lea ecx, [ebp - 0x1b4]
call fcn.00401fb9
lea ecx, [ebp - 0x1cc]
call fcn.00401fb9
lea ecx, [ebp - 0x64]
call fcn.00401ee2
test bl, bl
jne 0x406a19
push dword [ebp - 8]
call fcn.00430224
mov eax, dword [ebp - 0x1c]
sub dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x38]
sbb dword [ebp - 0x10], edx
add dword [ebp - 0x20], 1
mov esi, dword [ebp - 0x28]
pop ecx
mov ecx, dword [ebp - 0x30]
push 0
pop ebx
adc dword [ebp - 0x24], ebx
add ecx, eax
mov dword [ebp - 0x30], ecx
adc dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], esi
mov esi, dword [ebp - 0x3c]
jb 0x406770
ja 0x4069e6
cmp ecx, dword [ebp - 0x2c]
jb 0x406770
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00404f18
mov bl, 1
lea ecx, [ebp + 0xc]
call fcn.00401fb9
lea ecx, [ebp + 0x24]
call fcn.00401fb9
lea ecx, [ebp + 0x3c]
call fcn.00401fb9
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0x4c
mov ecx, esi
call fcn.00404f18
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call fcn.00430224
pop ecx
xor ebx, ebx
jmp 0x4069f6
push dword [ebp - 8]
call fcn.00430224
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00404f18
xor eax, eax
inc eax
jmp 0x406a9a
sub esp, 0x18
mov ecx, esp
push str.ReadFile_error
jmp 0x406a66
sub esp, 0x18
mov ecx, esp
push str.SetFilePointerEx_error
call fcn.00402076
sub esp, 0x18
mov ecx, esp
push 0x460568
call fcn.00402076
call fcn.00417670
push dword [ebp - 8]
call fcn.00430224
add esp, 0x34
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00404f18
mov al, bl
mov bl, al
jmp 0x4069f6