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

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
mov edi, dword [esp + 0x58]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edi
mov dword [esp + 0x3c], 1
mov dword [esp + 0x40], 0xa
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x48], 0x1e
mov dword [esp + 0x4c], 0x32
mov dword [esp + 0x50], 0xc8
mov dword [esp + 0x54], 0x1f4
mov dword [esp + 0x58], 0
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x46a5fa
push edi
call fcn.004674e0
add esp, 4
test al, al
je 0x46a78a
lea ebp, [esp + 0x20]
mov eax, dword [ebp]
test eax, eax
je 0x46a5f1
push eax
add ebp, 4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x46a5c2
jmp 0x46a5fa
cmp esi, 0xffffffff
je 0x46a78a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [esp + 0x14], edi
lea eax, [edi + 2]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov ebp, eax
test edi, edi
mov dword [esp + 0x10], ebp
jbe 0x46a656
lea ecx, [esp + 0x1c]
push 0
push ecx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46a656
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x50]
add esp, 4
test eax, eax
jne 0x46a8bf
jmp 0x46a8ba
cmp esi, 0xffffffff
je 0x46a662
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x44]
mov byte [edi + ebp], 0
mov byte [edi + ebp + 1], 0
movsx ecx, byte [ebx]
push ecx
call dword [sym.imp.MSVCRT.dll_toupper]
push 0x5b
push ebp
mov byte [esp + 0x64], al
call dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
add esp, 0xc
test edi, edi
je 0x46a780
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, edi
sub edx, ebp
cmp edx, eax
jge 0x46a780
movsx eax, byte [edi + 1]
lea ebp, [edi + 1]
push eax
mov dword [esp + 0x48], ebp
call dword [sym.imp.MSVCRT.dll_toupper]
movsx ecx, byte [esp + 0x5c]
add esp, 4
cmp eax, ecx
jne 0x46a758
mov eax, dword [esp + 0x10]
lea esi, [edi - 1]
cmp esi, eax
jb 0x46a70d
mov al, byte [esi]
cmp al, 0xa
je 0x46a6f6
movsx edx, al
push edx
call dword [sym.imp.MSVCRT.dll_isspace]
add esp, 4
test eax, eax
je 0x46a6f6
mov eax, dword [esp + 0x10]
dec esi
cmp esi, eax
jae 0x46a6d4
jmp 0x46a70d
cmp esi, dword [esp + 0x10]
jb 0x46a70d
movsx eax, byte [esi]
push eax
call dword [sym.imp.MSVCRT.dll_isspace]
add esp, 4
test eax, eax
je 0x46a758
mov al, byte [ebx + 1]
mov esi, 1
test al, al
je 0x46a74b
jmp 0x46a71f
mov ebp, dword [esp + 0x44]
movsx ecx, byte [esi + ebp]
push ecx
call dword [sym.imp.MSVCRT.dll_toupper]
movsx edx, byte [esi + ebx]
push edx
mov ebp, eax
call dword [sym.imp.MSVCRT.dll_toupper]
add esp, 8
cmp eax, ebp
jne 0x46a747
mov al, byte [esi + ebx + 1]
inc esi
test al, al
jne 0x46a71b
mov ebp, dword [esp + 0x44]
cmp byte [esi + ebx], 0
jne 0x46a758
cmp byte [esi + edi + 1], 0x5d
je 0x46a770
push 0x5b
push ebp
call dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
jne 0x46a693
jmp 0x46a77c
sub esi, dword [esp + 0x10]
lea esi, [esi + edi + 2]
test esi, esi
jne 0x46a7a7
mov ebp, dword [esp + 0x10]
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x46a797
mov eax, 0x4d7690
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
push ecx
push eax
push edx
jmp 0x46a8ca
mov ebx, dword [esp + 0x48]
movsx eax, byte [ebx]
push eax
call dword [sym.imp.MSVCRT.dll_toupper]
mov ecx, dword [esp + 0x14]
add esp, 4
add esi, ecx
mov byte [esp + 0x58], al
test esi, esi
je 0x46a8a4
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, esi
sub edx, ecx
cmp edx, eax
jge 0x46a8a4
movsx eax, byte [esi]
mov edi, dword [sym.imp.MSVCRT.dll_isspace]
push eax
call edi
add esp, 4
test eax, eax
je 0x46a800
movsx ecx, byte [esi + 1]
inc esi
push ecx
call edi
add esp, 4
test eax, eax
jne 0x46a7f1
mov al, byte [esi]
cmp al, 0x5b
je 0x46a8a4
movsx edx, al
push edx
call dword [sym.imp.MSVCRT.dll_toupper]
movsx ecx, byte [esp + 0x5c]
add esp, 4
cmp eax, ecx
jne 0x46a88d
mov al, byte [ebx + 1]
lea edi, [ebx + 1]
test al, al
mov dword [esp + 0x44], 1
je 0x46a86f
mov ebp, esi
sub ebp, ebx
movsx edx, byte [edi + ebp]
mov ebx, dword [sym.imp.MSVCRT.dll_toupper]
push edx
call ebx
mov edx, eax
movsx eax, byte [edi]
push eax
mov dword [esp + 0x20], edx
call ebx
mov ecx, dword [esp + 0x20]
add esp, 8
cmp eax, ecx
jne 0x46a86b
mov edx, dword [esp + 0x44]
mov al, byte [edi + 1]
inc edx
inc edi
test al, al
mov dword [esp + 0x44], edx
jne 0x46a836
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
cmp byte [eax + ebx], 0
jne 0x46a88d
add esi, eax
mov al, byte [esi]
cmp al, 9
je 0x46a885
cmp al, 0x20
jne 0x46a888
inc esi
jmp 0x46a87b
cmp byte [esi], 0x3d
je 0x46a8e8
inc esi
push 0xa
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
jne 0x46a7ca
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [esp + 0x50]
add esp, 4
test eax, eax
jne 0x46a8bf
mov eax, 0x4d7690
mov edx, dword [esp + 0x54]
push edx
push eax
mov eax, dword [esp + 0x58]
push eax
call fcn.004625f0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
pop edi
dec ecx
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x30
ret
mov al, byte [esi + 1]
inc esi
cmp al, 9
je 0x46a8e8
cmp al, 0x20
je 0x46a8e8
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
xor edi, edi
dec edx
test edx, edx
jle 0x46a920
mov ecx, ebx
sub ecx, esi
mov al, byte [esi]
cmp al, 0xd
mov byte [ecx + esi], al
je 0x46a920
mov al, byte [esi]
cmp al, 0xa
je 0x46a920
test al, al
je 0x46a920
inc edi
inc esi
cmp edi, edx
jl 0x46a907
dec edi
js 0x46a93a
mov esi, dword [sym.imp.MSVCRT.dll_isspace]
movsx eax, byte [edi + ebx]
push eax
call esi
add esp, 4
test eax, eax
je 0x46a955
dec edi
jns 0x46a929
mov eax, dword [esp + 0x10]
mov byte [ebx], 0
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
test edi, edi
jl 0x46a93a
mov byte [edi + ebx + 1], 0
mov al, byte [ebx]
cmp al, 0x22
jne 0x46a97f
cmp byte [edi + ebx], 0x22
jne 0x46a97f
dec edi
lea ecx, [ebx + 1]
push edi
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov byte [edi + ebx], 0
dec edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea eax, [edi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret