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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d8
push ebx
push esi
push edi
mov dword [ebp - 0x40], ecx
call fcn.00401671
sub esp, 0x10
mov esi, 0x462a50
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x40]
mov ecx, esi
call fcn.0040170d
xor ebx, ebx
mov dword [ebp - 0x18], 0x186a0
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
push dword [ebp + 8]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40485a
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.00402206
push 0x53
mov ecx, 0x463100
call fcn.004018ed
jmp 0x404c50
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], ebx
push eax
push edi
mov dword [ebp - 0x48], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
push dword [ebp + 8]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x1c], ecx
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0xc], eax
call fcn.00403540
lea edx, [ebp - 0x6c]
lea ecx, [ebp - 0x84]
call fcn.004119f1
sub esp, 0x18
mov edx, str.Uploading_file_to_Controller:
mov ecx, esp
push eax
call fcn.00402a93
sub esp, 0x14
mov ecx, esp
push 0x4563a4
call fcn.0040219e
call fcn.004113b1
add esp, 0x30
lea ecx, [ebp - 0x84]
call fcn.004020b7
lea ecx, [ebp - 0x6c]
call fcn.00403536
push ebx
mov eax, 0x186a0
mov dword [ebp - 0x20], 1
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x30]
call fcn.00447a30
add eax, 1
mov ecx, edx
xorps xmm0, xmm0
mov dword [ebp - 0x54], eax
adc ecx, ebx
movlpd qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x50], ecx
cmp dword [ebp - 0x2c], ebx
jb 0x404ba5
ja 0x404915
cmp dword [ebp - 0x30], ebx
jbe 0x404ba5
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov eax, 0x186a0
mov edx, dword [ebp - 0x1c]
cmp dword [ebp - 0x10], edx
jb 0x40493f
mov ecx, dword [ebp - 0xc]
ja 0x404937
cmp eax, ecx
jbe 0x40493f
mov eax, ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x18], eax
push eax
call fcn.00429842
pop ecx
push ebx
push ebx
push dword [ebp - 0x28]
mov dword [ebp - 8], eax
push dword [ebp - 0x38]
mov dword [ebp - 0x14], ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x404c1b
push ebx
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404c0f
cmp dword [ebp - 0x14], 0
je 0x404bf3
push dword [ebp + 8]
lea ecx, [ebp - 0x6c]
call fcn.00403540
push dword [ebp - 0x14]
lea ecx, [ebp - 0x1d4]
push dword [ebp - 8]
call fcn.004021c5
sub esp, 0x18
lea ecx, [ebp - 0x1bc]
mov esi, esp
mov ebx, 0x463028
push eax
push ebx
lea eax, [ebp + 0x3c]
push eax
push ebx
push dword [ebp - 0x50]
push dword [ebp - 0x54]
call fcn.00411916
pop ecx
pop ecx
push eax
push ebx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x1a4]
push dword [ebp - 0x20]
call fcn.00411916
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 - 0x6c]
lea ecx, [ebp - 0x18c]
call fcn.00411a52
mov edx, eax
lea ecx, [ebp - 0x174]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0x15c]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0x144]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0x12c]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0x114]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0xfc]
call fcn.00405b42
pop ecx
mov edx, eax
lea ecx, [ebp - 0xe4]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0xcc]
call fcn.00405b42
pop ecx
mov edx, eax
lea ecx, [ebp - 0xb4]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0x9c]
call fcn.004043f1
pop ecx
mov edx, eax
lea ecx, [ebp - 0x84]
call fcn.004043f1
pop ecx
mov edx, eax
mov ecx, esi
call fcn.00405b42
mov esi, dword [ebp - 0x40]
pop ecx
push 0x52
mov ecx, esi
call fcn.004018ed
cmp eax, 0xffffffff
lea ecx, [ebp - 0x84]
sete bl
call fcn.004020b7
lea ecx, [ebp - 0x9c]
call fcn.004020b7
lea ecx, [ebp - 0xb4]
call fcn.004020b7
lea ecx, [ebp - 0xcc]
call fcn.004020b7
lea ecx, [ebp - 0xe4]
call fcn.004020b7
lea ecx, [ebp - 0xfc]
call fcn.004020b7
lea ecx, [ebp - 0x114]
call fcn.004020b7
lea ecx, [ebp - 0x12c]
call fcn.004020b7
lea ecx, [ebp - 0x144]
call fcn.004020b7
lea ecx, [ebp - 0x15c]
call fcn.004020b7
lea ecx, [ebp - 0x174]
call fcn.004020b7
lea ecx, [ebp - 0x18c]
call fcn.004020b7
lea ecx, [ebp - 0x1a4]
call fcn.004020b7
lea ecx, [ebp - 0x1bc]
call fcn.004020b7
lea ecx, [ebp - 0x1d4]
call fcn.004020b7
lea ecx, [ebp - 0x6c]
call fcn.00403536
test bl, bl
jne 0x404bd8
push dword [ebp - 8]
call fcn.0042983d
mov eax, dword [ebp - 0x18]
sub dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x28]
pop ecx
mov ecx, dword [ebp - 0x1c]
sbb ecx, dword [ebp - 0x10]
add dword [ebp - 0x20], 1
push 0
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x38]
pop ebx
adc dword [ebp - 0x24], ebx
add ecx, eax
mov dword [ebp - 0x38], ecx
adc edx, dword [ebp - 0x10]
mov dword [ebp - 0x28], edx
cmp edx, dword [ebp - 0x2c]
jb 0x404926
ja 0x404ba5
cmp ecx, dword [ebp - 0x30]
jb 0x404926
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00401c54
mov bl, 1
lea ecx, [ebp + 0xc]
call fcn.004020b7
lea ecx, [ebp + 0x24]
call fcn.004020b7
lea ecx, [ebp + 0x3c]
call fcn.004020b7
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0x4c
mov ecx, esi
call fcn.00401c54
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call fcn.0042983d
pop ecx
xor ebx, ebx
jmp 0x404bb5
push dword [ebp - 8]
call fcn.0042983d
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00401c54
xor eax, eax
inc eax
jmp 0x404c59
sub esp, 0x18
mov ecx, esp
push str.ReadFile_error
jmp 0x404c25
sub esp, 0x18
mov ecx, esp
push str.SetFilePointerEx_error
call fcn.0040219e
sub esp, 0x18
mov ecx, esp
push 0x4562d4
call fcn.0040219e
call fcn.004113b1
push dword [ebp - 8]
call fcn.0042983d
add esp, 0x34
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00401c54
mov al, bl
mov bl, al
jmp 0x404bb5