Function at 0x406455
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.00404955
sub esp, 0x10
mov esi, 0x46bacc
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.004049d2
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 0x4064cc
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
call fcn.004020cc
push 0x53
mov ecx, 0x46c2e8
call fcn.00404a6e
jmp 0x4068c2
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.0040425f
lea edx, [ebp - 0x6c]
lea ecx, [ebp - 0x84]
call fcn.00416c93
sub esp, 0x18
mov edx, str.Uploading_file_to_Controller:
mov ecx, esp
push eax
call fcn.004075c4
sub esp, 0x14
mov ecx, esp
push str._Info_
call fcn.00402064
call fcn.004165d8
add esp, 0x30
lea ecx, [ebp - 0x84]
call fcn.00401fa7
lea ecx, [ebp - 0x6c]
call fcn.00401ed0
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.004500f0
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 0x406817
ja 0x406587
cmp dword [ebp - 0x30], ebx
jbe 0x406817
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 0x4065b1
mov ecx, dword [ebp - 0xc]
ja 0x4065a9
cmp eax, ecx
jbe 0x4065b1
mov eax, ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x18], eax
push eax
call fcn.0042ee1e
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 0x40688d
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 0x406881
cmp dword [ebp - 0x14], 0
je 0x406865
push dword [ebp + 8]
lea ecx, [ebp - 0x6c]
call fcn.0040425f
push dword [ebp - 0x14]
lea ecx, [ebp - 0x1d4]
push dword [ebp - 8]
call fcn.0040208b
sub esp, 0x18
lea ecx, [ebp - 0x1bc]
mov esi, esp
mov ebx, 0x46c238
push eax
push ebx
lea eax, [ebp + 0x3c]
push eax
push ebx
push dword [ebp - 0x50]
push dword [ebp - 0x54]
call fcn.00416bb8
pop ecx
pop ecx
push eax
push ebx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x1a4]
push dword [ebp - 0x20]
call fcn.00416bb8
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.00416cf4
mov edx, eax
lea ecx, [ebp - 0x174]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0x15c]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0x144]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0x12c]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0x114]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0xfc]
call fcn.00402efd
pop ecx
mov edx, eax
lea ecx, [ebp - 0xe4]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0xcc]
call fcn.00402efd
pop ecx
mov edx, eax
lea ecx, [ebp - 0xb4]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0x9c]
call fcn.00402f73
pop ecx
mov edx, eax
lea ecx, [ebp - 0x84]
call fcn.00402f73
pop ecx
mov edx, eax
mov ecx, esi
call fcn.00402efd
mov esi, dword [ebp - 0x40]
pop ecx
push 0x52
mov ecx, esi
call fcn.00404a6e
cmp eax, 0xffffffff
lea ecx, [ebp - 0x84]
sete bl
call fcn.00401fa7
lea ecx, [ebp - 0x9c]
call fcn.00401fa7
lea ecx, [ebp - 0xb4]
call fcn.00401fa7
lea ecx, [ebp - 0xcc]
call fcn.00401fa7
lea ecx, [ebp - 0xe4]
call fcn.00401fa7
lea ecx, [ebp - 0xfc]
call fcn.00401fa7
lea ecx, [ebp - 0x114]
call fcn.00401fa7
lea ecx, [ebp - 0x12c]
call fcn.00401fa7
lea ecx, [ebp - 0x144]
call fcn.00401fa7
lea ecx, [ebp - 0x15c]
call fcn.00401fa7
lea ecx, [ebp - 0x174]
call fcn.00401fa7
lea ecx, [ebp - 0x18c]
call fcn.00401fa7
lea ecx, [ebp - 0x1a4]
call fcn.00401fa7
lea ecx, [ebp - 0x1bc]
call fcn.00401fa7
lea ecx, [ebp - 0x1d4]
call fcn.00401fa7
lea ecx, [ebp - 0x6c]
call fcn.00401ed0
test bl, bl
jne 0x40684a
push dword [ebp - 8]
call fcn.0042ee27
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 0x406598
ja 0x406817
cmp ecx, dword [ebp - 0x30]
jb 0x406598
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00404dd5
mov bl, 1
lea ecx, [ebp + 0xc]
call fcn.00401fa7
lea ecx, [ebp + 0x24]
call fcn.00401fa7
lea ecx, [ebp + 0x3c]
call fcn.00401fa7
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0x4c
mov ecx, esi
call fcn.00404dd5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call fcn.0042ee27
pop ecx
xor ebx, ebx
jmp 0x406827
push dword [ebp - 8]
call fcn.0042ee27
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00404dd5
xor eax, eax
inc eax
jmp 0x4068cb
sub esp, 0x18
mov ecx, esp
push str.ReadFile_error
jmp 0x406897
sub esp, 0x18
mov ecx, esp
push str.SetFilePointerEx_error
call fcn.00402064
sub esp, 0x18
mov ecx, esp
push str._ERROR_
call fcn.00402064
call fcn.004165d8
push dword [ebp - 8]
call fcn.0042ee27
add esp, 0x34
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.00404dd5
mov al, bl
mov bl, al
jmp 0x406827