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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x648
mov eax, dword [0x42e0b4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [0x436748]
mov dword [ebp - 0x618], 0
mov dword [ebp - 0x630], 1
mov dword [ebp - 0x61c], ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x644], esi
push edi
test ebx, ebx
je 0x41d116
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x41d0f5
push 1
push ecx
lea edx, [ebp - 0x10c]
call fcn.0040b3c1
mov eax, dword [ebx + 8]
mov ecx, ebx
mov dword [ebp - 0x640], eax
call fcn.0040e272
mov edi, eax
mov dword [ebp - 0x624], edi
cmp edi, 0xffffffff
je 0x41d116
push 0
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSize]
mov ecx, dword [esi + 0x3c]
mov dword [ebp - 0x63c], eax
call fcn.0040ab7f
cmp byte [0x436755], 0
mov esi, eax
je 0x40c8a6
push 4
push 0x40228c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x40c8a6
movzx eax, word [esi + 8]
test ax, ax
jne 0x40cc47
mov eax, dword [ebp - 0x63c]
mov dword [ebx + 8], eax
mov byte [0x436744], 1
jmp 0x40ca78
cmp byte [edi + 1], 0xa
jne 0x40c9a7
mov eax, dword [ebp - 0x62c]
mov byte [edi + 2], 0
sub edi, edx
push 0
add edi, 2
push 0
add eax, edi
mov dword [ebp - 0x620], edi
push eax
push dword [ebp - 0x634]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
mov ecx, edi
mov edx, dword [ebp - 0x638]
mov ebx, dword [0x4325a0]
cmp ebx, 0x2b
jb 0x41d223
cmp ebx, 0xc42c
jae 0x41d223
mov eax, 1
push 0x200
lea esi, [ebp - 0x614]
push esi
push ecx
push edx
push eax
push ebx
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov ecx, eax
mov dword [ebp - 0x618], ecx
mov edi, dword [ebp - 0x624]
test eax, eax
je 0x40caa8
test ecx, ecx
je 0x40cab0
cmp ecx, 0xffffffff
je 0x40caa8
cmp word [ebp - 0x614], 0
je 0x40caa8
cmp word [ebp - 0x10c], 0
je 0x40caa8
lea eax, [ecx + ecx]
cmp eax, 0x402
jae 0x40cc65
xor ecx, ecx
mov word [ebp + eax - 0x614], cx
lea eax, [ebp - 0x614]
push 0x3a
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40c9d0
jmp 0x40c8a0
mov ebx, dword [ebp - 0x61c]
cmp dword [0x43259c], 0
jne 0x41d120
push 1
push 0
push 0
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
cmp dword [ebp - 0x630], 0
mov dword [ebx + 8], eax
je 0x40ca96
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
mov ebx, eax
mov dword [ebp - 0x634], ebx
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileType]
and eax, 0xffff7fff
cmp eax, 2
je 0x41d12a
push 1
push 0
push 0
push ebx
mov edi, 0x43a7f0
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
push 0x448e04
mov dword [ebp - 0x62c], eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
push 0
lea eax, [ebp - 0x618]
push eax
push 0x200
push edi
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
push 0x448e04
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
mov ecx, dword [ebp - 0x618]
test esi, esi
je 0x41d14e
mov dword [ebp - 0x620], ecx
test ecx, ecx
je 0x40cc5e
cmp dword [0x4325a0], 0xfde9
mov esi, ecx
mov dword [ebp - 0x628], esi
mov ebx, ecx
je 0x41d155
mov edx, edi
mov dword [ebp - 0x638], edx
test ebx, ebx
jle 0x40c7e8
lea ecx, [ecx]
cmp esi, 3
jl 0x40c9a7
mov al, byte [edi]
cmp al, 0xa
je 0x41d1ad
cmp al, 0xd
je 0x40c7ae
movzx eax, byte [edi]
cmp byte [eax + 0x448af0], 0
jne 0x41d1bc
dec esi
mov eax, 1
add edi, eax
mov dword [ebp - 0x628], esi
test esi, esi
jg 0x40c990
jmp 0x40c7e8
mov esi, ebx
add ebx, 2
mov dword [ebp - 0x620], ebx
cmp word [esi], 0xa
je 0x40c9f4
lea eax, [ebp - 0x614]
cmp esi, eax
je 0x40c9f4
sub esi, 2
cmp word [esi], 0xa
jne 0x40c9e1
cmp word [esi], 0x3a
je 0x40c9fd
add esi, 2
mov edi, esi
test esi, esi
je 0x40ca3b
movzx ebx, word [edi]
push ebx
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
je 0x40ca1e
cmp ebx, 0xa
je 0x40ca1e
add edi, 2
jmp 0x40ca03
push ebx
push 0x4022d0
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d29d
mov ebx, dword [ebp - 0x620]
cmp word [edi], 0x3a
je 0x40cae3
test ebx, ebx
je 0x40ca5f
push 0x3a
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40c9d0
mov edi, dword [ebp - 0x624]
mov ebx, dword [ebp - 0x61c]
cmp byte [0x436744], 1
jne 0x40c8a6
xor esi, esi
mov ecx, edi
call fcn.0040a16c
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416b30
mov esp, ebp
pop ebp
ret 4
cmp eax, dword [ebp - 0x640]
jl 0x40c8da
mov ecx, dword [ebp - 0x618]
test ecx, ecx
jne 0x41d3fc
cmp dword [ebp - 0x630], 0
je 0x41d3fc
push 0
push 0
push 0
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
mov dword [ebp - 0x630], 0
jmp 0x40c8a0
test esi, esi
je 0x41d2ab
push 0xa
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
mov ebx, eax
add esp, 8
mov dword [ebp - 0x620], ebx
test ebx, ebx
je 0x41d2b3
jmp 0x40cb10
movzx esi, word [edi]
push esi
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x41d345
push esi
push 0x4022d0
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d34f
movzx eax, word [edi]
cmp eax, 0x3a
jne 0x41d360
add edi, 2
test edi, edi
je 0x40cb7c
nop
movzx esi, word [edi]
push esi
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x41d36e
push esi
push 0x4022d0
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d378
xor ebx, ebx
mov edi, edi
movzx esi, word [edi]
push esi
push 0x4022b4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x40cbc9
push esi
push 0x4022c4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x40cbc9
cmp esi, 0x5e
je 0x41d389
mov ecx, esi
lea eax, [ebx + 1]
mov word [ebp + ebx*2 - 0x20c], cx
add edi, 2
mov ebx, eax
cmp eax, 0x7f
jb 0x40cb80
xor eax, eax
mov word [ebp + ebx*2 - 0x20c], ax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
mov ebx, dword [ebp - 0x620]
add esp, 8
test eax, eax
jne 0x40ca45
mov eax, dword [ebp - 0x644]
test byte [eax + 0x40], 1
je 0x41d395
mov al, 1
mov byte [0x436744], al
call fcn.00409434
test ebx, ebx
je 0x41d39c
lea ecx, [ebp - 0x614]
sub ebx, ecx
add ebx, 2
sar ebx, 1
test al, al
jne 0x41d3ca
mov esi, dword [ebp - 0x61c]
mov edi, dword [ebp - 0x624]
add dword [esi + 8], ebx
mov ebx, esi
jmp 0x40ca6b
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x40c799
jmp 0x40c8a6
xor eax, eax
jmp 0x40c826
call fcn.00416c78
int3
mov ecx, ebx
call fcn.00411cb1
mov eax, dword [ebx + 0x110]
push 0
push 0x2330
mov dword [0x436748], eax
call fcn.004078e4
add esp, 8
mov eax, 1
jmp 0x40ca83
call fcn.004298b5
jmp 0x40c8b3
lea eax, [ebp - 0x618]
mov ecx, ebx
push eax
push 0x200
lea edx, [ebp - 0x614]
call fcn.00424191
mov ecx, dword [ebp - 0x618]
jmp 0x40c82c
xor eax, eax
jmp 0x40c826
cmp dword [ebp - 0x62c], 0
jne 0x40c97d
push 3
push 0x4034f8
push 0x43a7f0
call sub.msvcrt.dll_memcmp
add esp, 0xc
mov ecx, ebx
test eax, eax
jne 0x40c97d
add ecx, 0xfffffffd
mov dword [ebp - 0x62c], 3
mov esi, ecx
mov dword [ebp - 0x620], ecx
mov edi, 0x43a7f3
mov dword [ebp - 0x618], ecx
mov dword [ebp - 0x628], esi
mov ebx, ecx
jmp 0x40c97d
cmp byte [edi + 1], 0xd
je 0x40c7b8
jmp 0x40c9a7
cmp esi, 1
je 0x41d1ce
add esi, 0xfffffffe
mov eax, 2
jmp 0x40c9bd
push 0x448e04
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
push 0
lea eax, [ebp - 0x628]
push eax
push 1
lea eax, [edi + 1]
push eax
push dword [ebp - 0x634]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
push 0x448e04
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
test esi, esi
je 0x41d21a
cmp dword [ebp - 0x628], 0
je 0x41d21a
mov ecx, dword [ebp - 0x620]
inc ecx
jmp 0x40c7e2
xor ecx, ecx
xor eax, eax
jmp 0x40c820
cmp ebx, 0xc435
ja 0x41d262
je 0x41d296
cmp ebx, 0xc431
ja 0x41d255
je 0x41d296
cmp ebx, 0x2a
je 0x41d296
cmp ebx, 0xc42b
jbe 0x40c803
cmp ebx, 0xc42e
jbe 0x41d296
jmp 0x40c803
cmp ebx, 0xc433
je 0x41d296
jmp 0x40c803
cmp ebx, 0xdeb3
ja 0x41d287
cmp ebx, 0xdeaa
jae 0x41d296
cmp ebx, 0xcec8
je 0x41d296
cmp ebx, 0xd698
je 0x41d296
jmp 0x40c803
lea eax, [ebx - 0xfde8]
cmp eax, 1
ja 0x40c803
xor eax, eax
jmp 0x40c808
test bx, bx
je 0x40ca35
jmp 0x40ca19
xor ebx, ebx
mov dword [ebp - 0x620], ebx
push 1
push 0
push 0
push dword [ebp - 0x624]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
cmp eax, dword [ebp - 0x63c]
je 0x40cb10
mov ecx, dword [ebp - 0x618]
cmp ecx, 0x200
je 0x40cb10
lea eax, [ebp - 0x614]
sub esi, eax
sar esi, 1
sub ecx, esi
call fcn.00409434
test al, al
je 0x41d322
push 0
push 0
push 0
push 0
push ecx
lea eax, [ebp - 0x614]
push eax
push 0
push dword [0x4325a0]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov ecx, eax
mov edi, dword [ebp - 0x624]
neg ecx
push 1
push 0
push ecx
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
jmp 0x40ca65
cmp esi, 0xa
jne 0x41d358
jmp 0x40cb25
test si, si
je 0x40cb3c
add edi, 2
jmp 0x40cb10
cmp eax, 0x2b
jne 0x40cb4b
jmp 0x40cb48
cmp esi, 0xa
jne 0x41d381
jmp 0x40cb65
test si, si
je 0x40cb7c
add edi, 2
jmp 0x40cb50
movzx ecx, word [edi + 2]
add edi, 2
jmp 0x40cbb4
xor al, al
jmp 0x40cc0a
test al, al
je 0x41d3b0
push 0
push 0
push 0
push 0
push dword [ebp - 0x618]
jmp 0x41d3d3
mov ebx, dword [ebp - 0x61c]
mov eax, dword [ebp - 0x618]
mov edi, dword [ebp - 0x624]
add dword [ebx + 8], eax
jmp 0x40ca6b
push 0
push 0
push 0
push 0
push ebx
lea eax, [ebp - 0x614]
push eax
push 0
push dword [0x4325a0]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x61c]
mov edi, dword [ebp - 0x624]
add dword [ebx + 8], eax
jmp 0x40ca6b
mov esi, dword [ebp - 0x61c]
mov ecx, esi
call fcn.00411cb1
mov eax, dword [esi + 0x110]
mov dword [0x436748], eax
lea eax, [ebp - 0x10c]
push eax
push 1
push 0x400023ab
call fcn.004078e4
add esp, 0xc
mov esi, 1
jmp 0x40ca7a