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

Disassembly:
mov eax, 0x4b7e01
call fcn.0049e324
sub esp, 0x1ac
mov eax, dword [0x57aa54]
xor eax, dword [ebp + 4]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x1b8], ecx
mov eax, dword [ebp - 0x1b8]
movzx eax, byte [eax + 8]
cmp eax, 0xaa
je 0x41b39f
push 0
call fcn.0041c25e
pop ecx
and byte [ebp - 0x19], 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004306c3
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x41b3c0
xor al, al
jmp 0x41b841
push 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x41b3e7
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
mov al, 1
jmp 0x41b841
cmp dword [ebp - 0x18], 0xffffffff
jne 0x41b463
cmp dword [ebp + 0xc], 0
je 0x41b450
lea ecx, [ebp - 0x3c]
call fcn.0041aa17
and dword [ebp - 4], 0
lea ecx, [ebp - 0x3c]
call fcn.0041bbf3
lea ecx, [ebp - 0x3c]
call fcn.00419db6
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
mov ecx, dword [ebp + 8]
call fcn.004191bc
push eax
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
push str.Failed_to_get_file_size
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.0041aba9
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
xor al, al
jmp 0x41b841
mov eax, dword [ebp - 0x18]
add eax, 4
push eax
mov ecx, dword [ebp - 0x1b8]
call fcn.0041a500
and dword [ebp - 0x20], 0
push 0
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x18]
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x1b8]
add eax, dword [ecx + 0x14]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x41b52c
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x1b8]
mov ecx, dword [ecx + 0x14]
and byte [eax + ecx], 0
cmp dword [ebp + 0xc], 0
je 0x41b527
lea ecx, [ebp - 0x58]
call fcn.0041aa17
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x58]
call fcn.0041bbf3
lea ecx, [ebp - 0x58]
call fcn.00419db6
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
mov ecx, dword [ebp + 8]
call fcn.004191bc
push eax
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
push str.Failed_to_read_data_from_file
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x58]
call fcn.0041aba9
jmp 0x41b832
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x18]
je 0x41b5b2
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x1b8]
mov ecx, dword [ecx + 0x14]
and byte [eax + ecx], 0
cmp dword [ebp + 0xc], 0
je 0x41b5ad
push dword [ebp - 0x18]
call fcn.0041bd75
pop ecx
push eax
push str.filesize
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
push dword [ebp - 0x20]
call fcn.0041bd75
pop ecx
push eax
push str.bytes_received
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
mov ecx, dword [ebp + 8]
call fcn.004191bc
push eax
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
push str.Failed_to_read_the_entire_file
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
jmp 0x41b832
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0x14]
add eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1b8]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x1b8]
mov ecx, dword [ecx + 0x14]
and byte [eax + ecx], 0
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax]
cmp eax, 0xffffffff
jne 0x41b699
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 1]
cmp eax, 0xfffffffe
jne 0x41b699
lea ecx, [ebp - 0xfc]
call fcn.0041d486
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x6c]
call fcn.0041c292
mov byte [ebp - 4], 3
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x1b8]
push dword [eax + 0x14]
mov eax, dword [ebp - 0x1b8]
push dword [eax + 0xc]
push 0xfde9
push 0x4b0
lea ecx, [ebp - 0xfc]
call fcn.004209d4
mov ecx, dword [ebp - 0x1b8]
call fcn.00419f86
lea ecx, [ebp - 0x6c]
call fcn.00419db6
push eax
lea ecx, [ebp - 0x6c]
call fcn.0046a54d
push eax
mov ecx, dword [ebp - 0x1b8]
call fcn.0041a76b
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6c]
call fcn.0041ca9d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xfc]
call fcn.0044c2de
jmp 0x41b82e
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax]
cmp eax, 0xfffffffe
jne 0x41b764
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 1]
cmp eax, 0xffffffff
jne 0x41b764
lea ecx, [ebp - 0x19c]
call fcn.0041d486
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x110]
call fcn.0041c292
mov byte [ebp - 4], 5
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 0x1b8]
push dword [eax + 0x14]
mov eax, dword [ebp - 0x1b8]
push dword [eax + 0xc]
push 0xfde9
push 0x4b1
lea ecx, [ebp - 0x19c]
call fcn.004209d4
mov ecx, dword [ebp - 0x1b8]
call fcn.00419f86
lea ecx, [ebp - 0x110]
call fcn.00419db6
push eax
lea ecx, [ebp - 0x110]
call fcn.0046a54d
push eax
mov ecx, dword [ebp - 0x1b8]
call fcn.0041a76b
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x110]
call fcn.0041ca9d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x19c]
call fcn.0044c2de
jmp 0x41b82e
mov eax, dword [ebp - 0x1b8]
cmp dword [eax + 0x14], 3
jle 0x41b82e
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1a0], eax
mov eax, dword [ebp - 0x1a0]
movzx eax, byte [eax]
cmp eax, 0xef
jne 0x41b82e
mov eax, dword [ebp - 0x1a0]
movzx eax, byte [eax + 1]
cmp eax, 0xbb
jne 0x41b82e
mov eax, dword [ebp - 0x1a0]
movzx eax, byte [eax + 2]
cmp eax, 0xbf
jne 0x41b82e
lea ecx, [ebp - 0x1b4]
call fcn.0041c292
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x1b8]
mov eax, dword [eax + 0x14]
sub eax, 3
push eax
mov eax, dword [ebp - 0x1a0]
add eax, 3
push eax
lea ecx, [ebp - 0x1b4]
call fcn.0041ce9b
mov ecx, dword [ebp - 0x1b8]
call fcn.00419f86
lea ecx, [ebp - 0x1b4]
call fcn.00419db6
push eax
lea ecx, [ebp - 0x1b4]
call fcn.0046a54d
push eax
mov ecx, dword [ebp - 0x1b8]
call fcn.0041a76b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1b4]
call fcn.0041ca9d
mov byte [ebp - 0x19], 1
push 0
push dword [ebp - 0x10]
call fcn.00436fc2
pop ecx
pop ecx
mov al, byte [ebp - 0x19]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x70]
xor ecx, dword [ebp + 4]
call fcn.0049c63c
leave
ret 8