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

Disassembly:
mov eax, 0x10424
call fcn.10010280
push ebx
push esi
push edi
push 0x1003d090
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea eax, [esp + 0x18]
lea edi, [esp + 0x30]
push eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov eax, dword [esp + 0x10448]
mov dword [esp + 0xc], 2
cmp eax, esi
ja 0x1001398b
mov dword [esp + 0x10448], esi
mov dword [esp + 0xc], 3
mov ecx, dword [esp + 0x10434]
push esi
push esi
push 3
push esi
push 1
push bind
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x10013bc3
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, dword [esp + 0x10450]
mov ecx, dword [esp + 0x1044c]
mov dword [esp + 0x2c], eax
lea edx, [ecx + ebp]
cmp edx, eax
jbe 0x100139e9
mov ebp, eax
sub ebp, ecx
mov ecx, dword [esp + 0x10]
or ecx, 4
mov dword [esp + 0x10], ecx
test ebp, ebp
ja 0x10013a0a
test eax, eax
mov ebp, eax
mov dword [esp + 0x1044c], 0
mov dword [esp + 0x10], 7
jbe 0x10013ba2
cmp ebp, 0x3c00000
ja 0x10013ba2
cmp ebp, 0x10000
mov dword [esp + 0x14], 2
jbe 0x10013a48
lea eax, [ebp + 0x400]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
test edi, edi
jne 0x10013a54
mov dword [esp + 0x14], 3
jmp 0x10013baa
lea ecx, [esp + 0x34]
test ecx, ecx
je 0x10013baa
mov edx, dword [esp + 0x10438]
push edx
push str.filename:__s_r_n
push edi
call ebx
mov ecx, dword [esp + 0x32]
mov edx, dword [esp + 0x30]
mov esi, eax
mov eax, dword [esp + 0x34]
add esp, 0xc
and eax, 0xffff
and ecx, 0xffff
and edx, 0xffff
push eax
mov eax, dword [esp + 0x26]
push ecx
mov ecx, dword [esp + 0x26]
push edx
mov edx, dword [esp + 0x28]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [esi + edi]
push str.time:__04d_02d_02d_02d_02d_02d_r_n
push eax
call ebx
add esp, 0x20
add esi, eax
push ebp
lea ecx, [esi + edi]
push str.content_length:__d_r_n
push ecx
call ebx
mov edx, dword [esp + 0x10450]
add esp, 0xc
add esi, eax
push edx
push str.monitortype:__s_r_n
lea eax, [esi + edi]
push eax
call ebx
mov ecx, dword [esp + 0x10454]
add esp, 0xc
add esi, eax
push ecx
push str.monitorvalue:__s_r_n
lea edx, [esi + edi]
push edx
call ebx
add esp, 0xc
add esi, eax
mov eax, dword [esp + 0x1044c]
push eax
lea ecx, [esi + edi]
push str.begpos:__u_r_n
push ecx
call ebx
mov edx, dword [esp + 0x1c]
add esp, 0xc
add esi, eax
push edx
push str.blockstate:__d_r_n
lea eax, [esi + edi]
push eax
call ebx
mov ecx, dword [esp + 0x38]
add esp, 0xc
add esi, eax
push ecx
push str.totallen:__u_r_n
lea edx, [esi + edi]
push edx
call ebx
add esp, 0xc
add esi, eax
lea eax, [esi + edi]
push str.content_type:_file_r_n_r_n
push eax
call ebx
mov ecx, dword [esp + 0x10448]
mov edx, dword [esp + 0x10444]
add esi, eax
push ecx
push edx
push esi
push edi
call dword [0x1003d0ac]
mov eax, dword [esp + 0x10464]
mov ecx, dword [esp + 0x30]
add esp, 0x18
xor esi, esi
push esi
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x30]
push esi
push edx
push ebp
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10013b98
mov esi, dword [esp + 0x30]
jmp 0x10013baa
mov dword [esp + 0x14], 4
jmp 0x10013baa
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop ebp
cmp eax, 2
je 0x10013c64
mov edx, dword [esp + 0x10434]
add esi, edi
push edx
push str.filename:__s_r_n
push esi
call ebx
mov ecx, dword [esp + 0x2e]
mov edx, dword [esp + 0x2c]
mov esi, eax
mov eax, dword [esp + 0x30]
add esp, 0xc
and eax, 0xffff
and ecx, 0xffff
and edx, 0xffff
push eax
mov eax, dword [esp + 0x22]
push ecx
mov ecx, dword [esp + 0x22]
push edx
mov edx, dword [esp + 0x24]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [esi + edi]
push str.time:__04d_02d_02d_02d_02d_02d_r_n
push eax
call ebx
add esp, 0x20
add esi, eax
push 0xffffffffffffffff
lea ecx, [esi + edi]
push str.content_length:__d_r_n
push ecx
call ebx
mov edx, dword [esp + 0x1044c]
add esp, 0xc
add esi, eax
push edx
push str.monitortype:__s_r_n
lea eax, [esi + edi]
push eax
call ebx
add esi, eax
add esp, 0xc
lea ecx, [esi + edi]
push str.content_type:_file_r_n_r_n
push ecx
call ebx
add esp, 8
add esi, eax
mov edx, dword [esp + 0x1043c]
mov eax, dword [esp + 0x10438]
push edx
push eax
push esi
push edi
call dword [0x1003d0ac]
add esp, 0x10
test edi, edi
je 0x10013c94
lea ecx, [esp + 0x30]
cmp edi, ecx
je 0x10013c94
push edi
call fcn.10010220
add esp, 4
push 0x1003d090
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
pop edi
pop esi
pop ebx
add esp, 0x10424
ret