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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x648
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [0x435738]
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 0x41d002
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x41cfe1
push 1
push ecx
lea edx, [ebp - 0x10c]
call fcn.0040b2d1
mov eax, dword [ebx + 8]
mov ecx, ebx
mov dword [ebp - 0x640], eax
call fcn.0040e1b2
mov edi, eax
mov dword [ebp - 0x624], edi
cmp edi, 0xffffffff
je 0x41d002
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.0040aa9f
cmp byte [0x435745], 0
mov esi, eax
je 0x40c7e6
push 4
push 0x40227c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x40c7e6
movzx eax, word [esi + 8]
test ax, ax
jne 0x40cb87
mov eax, dword [ebp - 0x63c]
mov dword [ebx + 8], eax
mov byte [0x435734], 1
jmp 0x40c9b8
cmp byte [edi + 1], 0xa
jne 0x40c8e7
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 [0x431590]
cmp ebx, 0x2b
jb 0x41d10f
cmp ebx, 0xc42c
jae 0x41d10f
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 0x40c9e8
test ecx, ecx
je 0x40c9f0
cmp ecx, 0xffffffff
je 0x40c9e8
cmp word [ebp - 0x614], 0
je 0x40c9e8
cmp word [ebp - 0x10c], 0
je 0x40c9e8
lea eax, [ecx + ecx]
cmp eax, 0x402
jae 0x40cba5
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 0x40c910
jmp 0x40c7e0
mov ebx, dword [ebp - 0x61c]
cmp dword [0x43158c], 0
jne 0x41d00c
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 0x40c9d6
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 0x41d016
push 1
push 0
push 0
push ebx
mov edi, 0x4397e0
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
push 0x447df4
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 0x447df4
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 0x41d03a
mov dword [ebp - 0x620], ecx
test ecx, ecx
je 0x40cb9e
cmp dword [0x431590], 0xfde9
mov esi, ecx
mov dword [ebp - 0x628], esi
mov ebx, ecx
je 0x41d041
mov edx, edi
mov dword [ebp - 0x638], edx
test ebx, ebx
jle 0x40c728
lea ecx, [ecx]
cmp esi, 3
jl 0x40c8e7
mov al, byte [edi]
cmp al, 0xa
je 0x41d099
cmp al, 0xd
je 0x40c6ee
movzx eax, byte [edi]
cmp byte [eax + 0x447ae0], 0
jne 0x41d0a8
dec esi
mov eax, 1
add edi, eax
mov dword [ebp - 0x628], esi
test esi, esi
jg 0x40c8d0
jmp 0x40c728
mov esi, ebx
add ebx, 2
mov dword [ebp - 0x620], ebx
cmp word [esi], 0xa
je 0x40c934
lea eax, [ebp - 0x614]
cmp esi, eax
je 0x40c934
sub esi, 2
cmp word [esi], 0xa
jne 0x40c921
cmp word [esi], 0x3a
je 0x40c93d
add esi, 2
mov edi, esi
test esi, esi
je 0x40c97b
movzx ebx, word [edi]
push ebx
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
je 0x40c95e
cmp ebx, 0xa
je 0x40c95e
add edi, 2
jmp 0x40c943
push ebx
push 0x4022c0
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d189
mov ebx, dword [ebp - 0x620]
cmp word [edi], 0x3a
je 0x40ca23
test ebx, ebx
je 0x40c99f
push 0x3a
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40c910
mov edi, dword [ebp - 0x624]
mov ebx, dword [ebp - 0x61c]
cmp byte [0x435734], 1
jne 0x40c7e6
xor esi, esi
mov ecx, edi
call fcn.0040a0ab
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
mov esp, ebp
pop ebp
ret 4
cmp eax, dword [ebp - 0x640]
jl 0x40c81a
mov ecx, dword [ebp - 0x618]
test ecx, ecx
jne 0x41d2e8
cmp dword [ebp - 0x630], 0
je 0x41d2e8
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 0x40c7e0
test esi, esi
je 0x41d197
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 0x41d19f
jmp 0x40ca50
movzx esi, word [edi]
push esi
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x41d231
push esi
push 0x4022c0
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d23b
movzx eax, word [edi]
cmp eax, 0x3a
jne 0x41d24c
add edi, 2
test edi, edi
je 0x40cabc
nop
movzx esi, word [edi]
push esi
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x41d25a
push esi
push 0x4022c0
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d264
xor ebx, ebx
mov edi, edi
movzx esi, word [edi]
push esi
push 0x4022a4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x40cb09
push esi
push 0x4022b4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x40cb09
cmp esi, 0x5e
je 0x41d275
mov ecx, esi
lea eax, [ebx + 1]
mov word [ebp + ebx*2 - 0x20c], cx
add edi, 2
mov ebx, eax
cmp eax, 0x7f
jb 0x40cac0
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 0x40c985
mov eax, dword [ebp - 0x644]
test byte [eax + 0x40], 1
je 0x41d281
mov al, 1
mov byte [0x435734], al
call fcn.00409381
test ebx, ebx
je 0x41d288
lea ecx, [ebp - 0x614]
sub ebx, ecx
add ebx, 2
sar ebx, 1
test al, al
jne 0x41d2b6
mov esi, dword [ebp - 0x61c]
mov edi, dword [ebp - 0x624]
add dword [esi + 8], ebx
mov ebx, esi
jmp 0x40c9ab
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x40c6d9
jmp 0x40c7e6
xor eax, eax
jmp 0x40c766
call fcn.00416c18
int3
mov ecx, ebx
call fcn.00411c31
mov eax, dword [ebx + 0x110]
push 0
push 0x2330
mov dword [0x435738], eax
call fcn.00407834
add esp, 8
mov eax, 1
jmp 0x40c9c3
call fcn.004296f5
jmp 0x40c7f3
lea eax, [ebp - 0x618]
mov ecx, ebx
push eax
push 0x200
lea edx, [ebp - 0x614]
call fcn.00423fbb
mov ecx, dword [ebp - 0x618]
jmp 0x40c76c
xor eax, eax
jmp 0x40c766
cmp dword [ebp - 0x62c], 0
jne 0x40c8bd
push 3
push 0x40343c
push 0x4397e0
call sub.msvcrt.dll_memcmp
add esp, 0xc
mov ecx, ebx
test eax, eax
jne 0x40c8bd
add ecx, 0xfffffffd
mov dword [ebp - 0x62c], 3
mov esi, ecx
mov dword [ebp - 0x620], ecx
mov edi, 0x4397e3
mov dword [ebp - 0x618], ecx
mov dword [ebp - 0x628], esi
mov ebx, ecx
jmp 0x40c8bd
cmp byte [edi + 1], 0xd
je 0x40c6f8
jmp 0x40c8e7
cmp esi, 1
je 0x41d0ba
add esi, 0xfffffffe
mov eax, 2
jmp 0x40c8fd
push 0x447df4
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 0x447df4
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
test esi, esi
je 0x41d106
cmp dword [ebp - 0x628], 0
je 0x41d106
mov ecx, dword [ebp - 0x620]
inc ecx
jmp 0x40c722
xor ecx, ecx
xor eax, eax
jmp 0x40c760
cmp ebx, 0xc435
ja 0x41d14e
je 0x41d182
cmp ebx, 0xc431
ja 0x41d141
je 0x41d182
cmp ebx, 0x2a
je 0x41d182
cmp ebx, 0xc42b
jbe 0x40c743
cmp ebx, 0xc42e
jbe 0x41d182
jmp 0x40c743
cmp ebx, 0xc433
je 0x41d182
jmp 0x40c743
cmp ebx, 0xdeb3
ja 0x41d173
cmp ebx, 0xdeaa
jae 0x41d182
cmp ebx, 0xcec8
je 0x41d182
cmp ebx, 0xd698
je 0x41d182
jmp 0x40c743
lea eax, [ebx - 0xfde8]
cmp eax, 1
ja 0x40c743
xor eax, eax
jmp 0x40c748
test bx, bx
je 0x40c975
jmp 0x40c959
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 0x40ca50
mov ecx, dword [ebp - 0x618]
cmp ecx, 0x200
je 0x40ca50
lea eax, [ebp - 0x614]
sub esi, eax
sar esi, 1
sub ecx, esi
call fcn.00409381
test al, al
je 0x41d20e
push 0
push 0
push 0
push 0
push ecx
lea eax, [ebp - 0x614]
push eax
push 0
push dword [0x431590]
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 0x40c9a5
cmp esi, 0xa
jne 0x41d244
jmp 0x40ca65
test si, si
je 0x40ca7c
add edi, 2
jmp 0x40ca50
cmp eax, 0x2b
jne 0x40ca8b
jmp 0x40ca88
cmp esi, 0xa
jne 0x41d26d
jmp 0x40caa5
test si, si
je 0x40cabc
add edi, 2
jmp 0x40ca90
movzx ecx, word [edi + 2]
add edi, 2
jmp 0x40caf4
xor al, al
jmp 0x40cb4a
test al, al
je 0x41d29c
push 0
push 0
push 0
push 0
push dword [ebp - 0x618]
jmp 0x41d2bf
mov ebx, dword [ebp - 0x61c]
mov eax, dword [ebp - 0x618]
mov edi, dword [ebp - 0x624]
add dword [ebx + 8], eax
jmp 0x40c9ab
push 0
push 0
push 0
push 0
push ebx
lea eax, [ebp - 0x614]
push eax
push 0
push dword [0x431590]
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 0x40c9ab
mov esi, dword [ebp - 0x61c]
mov ecx, esi
call fcn.00411c31
mov eax, dword [esi + 0x110]
mov dword [0x435738], eax
lea eax, [ebp - 0x10c]
push eax
push 1
push 0x400023ab
call fcn.00407834
add esp, 0xc
mov esi, 1
jmp 0x40c9ba