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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x640
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [0x443cd4]
mov ebx, 1
mov dword [ebp - 0x634], eax
mov dword [ebp - 0x618], 0
mov dword [ebp - 0x62c], ebx
mov dword [ebp - 0x624], esi
push edi
test esi, esi
je 0x41d06d
mov ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x41d04c
push ebx
push ecx
lea edx, [ebp - 0x20c]
call fcn.00408444
mov eax, dword [esi + 8]
mov ecx, esi
mov dword [ebp - 0x638], eax
call fcn.0040f9d3
mov edi, eax
mov dword [ebp - 0x61c], edi
cmp edi, 0xffffffff
je 0x41d06d
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_2_1.dll_GetFileSize]
mov ecx, dword [ebp - 0x634]
mov dword [ebp - 0x630], eax
mov ecx, dword [ecx + 0x3c]
call fcn.0040ce09
cmp byte [0x443cd9], 0
mov esi, eax
je 0x4085b0
push 4
push 0x40233c
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x408956
mov edi, edi
cmp dword [0x42d54c], 0
jne 0x41d074
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_2_1.dll_SetFilePointer]
mov esi, dword [ebp - 0x624]
mov dword [esi + 8], eax
cmp eax, dword [ebp - 0x638]
jl 0x4085ed
test ebx, ebx
je 0x408a3a
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
mov ebx, eax
mov dword [ebp - 0x620], ebx
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileType]
and eax, 0xffff7fff
cmp eax, 2
je 0x41d07e
push 1
push 0
push 0
push ebx
mov edi, 0x42d630
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
push 0x447f30
mov dword [ebp - 0x63c], eax
call dword [sym.imp.api_ms_win_core_synch_l1_2_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_2_1.dll_ReadFile]
push 0x447f30
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSRWLockShared]
mov ebx, dword [ebp - 0x618]
test esi, esi
je 0x41d0a2
test ebx, ebx
je 0x4089fa
mov ecx, ebx
mov dword [ebp - 0x628], ecx
test ebx, ebx
jle 0x4086e5
lea esp, [esp]
cmp ecx, 3
jl 0x408693
mov al, byte [edi]
cmp al, 0xa
je 0x41d0a9
cmp al, 0xd
je 0x4086b7
movzx eax, byte [edi]
cmp byte [eax + 0x447f40], 0
jne 0x41d0b8
dec ecx
mov eax, 1
add edi, eax
mov dword [ebp - 0x628], ecx
test ecx, ecx
jg 0x408680
jmp 0x4086e5
cmp byte [edi + 1], 0xa
jne 0x408693
mov eax, dword [ebp - 0x63c]
mov ebx, edi
sub ebx, 0x42d630
mov byte [edi + 2], 0
push 0
add ebx, 2
push 0
add eax, ebx
push eax
push dword [ebp - 0x620]
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
mov ecx, dword [0x433864]
cmp ecx, 0x2b
jb 0x41d119
cmp ecx, 0xc42c
jae 0x41d119
mov eax, 1
push 0x200
lea edx, [ebp - 0x614]
push edx
push ebx
push 0x42d630
push eax
push ecx
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov ebx, eax
mov dword [ebp - 0x618], ebx
mov edi, dword [ebp - 0x61c]
mov esi, dword [ebp - 0x624]
test eax, eax
je 0x408a01
test ebx, ebx
je 0x408a09
cmp ebx, 0xffffffff
je 0x408a01
cmp word [ebp - 0x614], 0
je 0x408a01
cmp word [ebp - 0x20c], 0
je 0x408a01
lea eax, [ebx + ebx]
cmp eax, 0x402
jae 0x408a42
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, dword [ebp - 0x62c]
add esp, 8
test eax, eax
je 0x4085b0
mov esi, eax
add eax, 2
mov dword [ebp - 0x620], eax
cmp word [esi], 0xa
je 0x4087c4
lea ecx, [ebp - 0x614]
cmp esi, ecx
je 0x4087c4
sub esi, 2
cmp word [esi], 0xa
jne 0x4087b1
cmp word [esi], 0x3a
je 0x4087cd
add esi, 2
mov edi, esi
test esi, esi
je 0x40880b
movzx ebx, word [edi]
push ebx
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
je 0x4087ee
cmp ebx, 0xa
je 0x4087ee
add edi, 2
jmp 0x4087d3
push ebx
push 0x4022a4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d193
mov eax, dword [ebp - 0x620]
cmp word [edi], 0x3a
je 0x408847
test eax, eax
je 0x408829
push 0x3a
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x4087a0
mov edi, dword [ebp - 0x61c]
cmp byte [0x42d598], 1
je 0x408978
mov ebx, dword [ebp - 0x62c]
jmp 0x4085b0
test esi, esi
je 0x41d1a1
push 0xa
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
mov dword [ebp - 0x620], eax
test eax, eax
je 0x41d1a9
lea esp, [esp]
movzx esi, word [edi]
push esi
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x41d23b
push esi
push 0x4022a4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d245
movzx eax, word [edi]
cmp eax, 0x3a
jne 0x41d256
add edi, 2
test edi, edi
je 0x4088dc
nop
movzx esi, word [edi]
push esi
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x41d264
push esi
push 0x4022a4
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x41d26e
movzx esi, word [edi]
xor ebx, ebx
push esi
push 0x402288
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x408926
push esi
push 0x402298
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x408926
cmp si, 0x5e
je 0x41d27f
mov word [ebp + ebx*2 - 0x10c], si
movzx esi, word [edi + 2]
add edi, 2
inc ebx
cmp ebx, 0x7f
jb 0x4088e1
xor eax, eax
mov word [ebp + ebx*2 - 0x10c], ax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x408996
mov eax, dword [ebp - 0x620]
jmp 0x408811
movzx eax, word [esi + 8]
test ax, ax
jne 0x4089e3
mov ecx, dword [ebp - 0x624]
mov eax, dword [ebp - 0x630]
mov byte [0x42d598], bl
mov dword [ecx + 8], eax
xor esi, esi
mov ecx, edi
call fcn.0040caaa
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ce0
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x634]
test byte [eax + 0x40], 1
je 0x41d293
mov byte [0x42d598], 1
mov ecx, dword [ebp - 0x620]
call fcn.00408a47
test ecx, ecx
je 0x41d29f
test al, al
lea eax, [ebp - 0x614]
jne 0x41d2b3
mov edx, dword [ebp - 0x624]
sub ecx, eax
add ecx, 2
sar ecx, 1
add dword [edx + 8], ecx
jmp 0x408829
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
add esp, 4
test eax, eax
jne 0x408963
jmp 0x4085b0
xor eax, eax
jmp 0x408727
test ebx, ebx
jne 0x41d2fa
cmp dword [ebp - 0x62c], 0
je 0x41d2fa
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_2_1.dll_SetFilePointer]
xor ebx, ebx
mov dword [ebp - 0x62c], ebx
jmp 0x4085b0
mov ebx, dword [ebp - 0x618]
jmp 0x408a01
call fcn.00416e2a
mov ecx, esi
call fcn.00404deb
mov eax, dword [esi + 0x110]
push 0
push 0x2330
mov dword [0x443cd4], eax
call fcn.00414802
add esp, 8
mov eax, ebx
jmp 0x408983
call fcn.00428fe1
jmp 0x4085bd
lea eax, [ebp - 0x618]
mov ecx, ebx
push eax
push 0x200
lea edx, [ebp - 0x614]
call fcn.00423948
mov ebx, dword [ebp - 0x618]
jmp 0x408733
xor eax, eax
jmp 0x408727
cmp byte [edi + 1], 0xd
je 0x4086bd
jmp 0x40868f
cmp ecx, 1
je 0x41d0ca
sub ecx, 2
mov eax, 2
jmp 0x4086a9
push 0x447f30
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_AcquireSRWLockShared]
push 0
lea eax, [ebp - 0x628]
push eax
push 1
lea eax, [edi + 1]
push eax
push dword [ebp - 0x620]
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_ReadFile]
push 0x447f30
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSRWLockShared]
test esi, esi
je 0x41d110
cmp dword [ebp - 0x628], 0
je 0x41d110
inc ebx
jmp 0x4086e5
xor ebx, ebx
xor eax, eax
jmp 0x408721
cmp ecx, 0xc435
ja 0x41d158
je 0x41d18c
cmp ecx, 0xc431
ja 0x41d14b
je 0x41d18c
cmp ecx, 0x2a
je 0x41d18c
cmp ecx, 0xc42b
jbe 0x408700
cmp ecx, 0xc42e
jbe 0x41d18c
jmp 0x408700
cmp ecx, 0xc433
je 0x41d18c
jmp 0x408700
cmp ecx, 0xdeb3
ja 0x41d17d
cmp ecx, 0xdeaa
jae 0x41d18c
cmp ecx, 0xcec8
je 0x41d18c
cmp ecx, 0xd698
je 0x41d18c
jmp 0x408700
lea eax, [ecx - 0xfde8]
cmp eax, 1
ja 0x408700
xor eax, eax
jmp 0x408705
test bx, bx
je 0x408805
jmp 0x4087e9
xor eax, eax
mov dword [ebp - 0x620], eax
push 1
push 0
push 0
push dword [ebp - 0x61c]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
cmp eax, dword [ebp - 0x630]
je 0x408870
mov ecx, dword [ebp - 0x618]
cmp ecx, 0x200
je 0x408870
lea eax, [ebp - 0x614]
sub esi, eax
sar esi, 1
sub ecx, esi
call fcn.00408a47
test al, al
je 0x41d218
push 0
push 0
push 0
push 0
push ecx
lea eax, [ebp - 0x614]
push eax
push 0
push dword [0x433864]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov ecx, eax
mov edi, dword [ebp - 0x61c]
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_2_1.dll_SetFilePointer]
jmp 0x40882f
cmp esi, 0xa
jne 0x41d24e
jmp 0x408885
test si, si
je 0x40889c
add edi, 2
jmp 0x408870
cmp eax, 0x2b
jne 0x4088ab
jmp 0x4088a8
cmp esi, 0xa
jne 0x41d277
jmp 0x4088c5
test si, si
je 0x4088dc
add edi, 2
jmp 0x4088b0
mov ax, word [edi + 2]
add edi, 2
mov word [ebp + ebx*2 - 0x10c], ax
jmp 0x408919
mov byte [0x42d598], 0
jmp 0x4089ad
test al, al
je 0x41d2e6
push 0
push 0
push 0
push 0
push dword [ebp - 0x618]
jmp 0x41d2c3
push 0
push 0
sub ecx, eax
push 0
add ecx, 2
push 0
sar ecx, 1
push ecx
lea eax, [ebp - 0x614]
push eax
push 0
push dword [0x433864]
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x624]
add dword [ecx + 8], eax
jmp 0x408829
mov ecx, dword [ebp - 0x624]
mov eax, dword [ebp - 0x618]
add dword [ecx + 8], eax
jmp 0x408829
mov ecx, esi
call fcn.00404deb
mov eax, dword [esi + 0x110]
mov dword [0x443cd4], eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0x400023ab
call fcn.00414802
add esp, 0xc
mov esi, 1
jmp 0x40897a