Function at 0x416d50
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 closesocket
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 0x416e0a
push edi
call fcn.004148e0
add esp, 4
test al, al
je 0x416f9a
lea ebp, [esp + 0x20]
mov eax, dword [ebp]
test eax, eax
je 0x416e01
push eax
add ebp, 4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x416dd2
jmp 0x416e0a
cmp esi, 0xffffffff
je 0x416f9a
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 0x416e66
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 0x416e66
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 0x4170cf
jmp 0x4170ca
cmp esi, 0xffffffff
je 0x416e72
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 0x416f90
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, edi
sub edx, ebp
cmp edx, eax
jge 0x416f90
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 0x416f68
mov eax, dword [esp + 0x10]
lea esi, [edi - 1]
cmp esi, eax
jb 0x416f1d
mov al, byte [esi]
cmp al, 0xa
je 0x416f06
movsx edx, al
push edx
call dword [sym.imp.MSVCRT.dll_isspace]
add esp, 4
test eax, eax
je 0x416f06
mov eax, dword [esp + 0x10]
dec esi
cmp esi, eax
jae 0x416ee4
jmp 0x416f1d
cmp esi, dword [esp + 0x10]
jb 0x416f1d
movsx eax, byte [esi]
push eax
call dword [sym.imp.MSVCRT.dll_isspace]
add esp, 4
test eax, eax
je 0x416f68
mov al, byte [ebx + 1]
mov esi, 1
test al, al
je 0x416f5b
jmp 0x416f2f
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 0x416f57
mov al, byte [esi + ebx + 1]
inc esi
test al, al
jne 0x416f2b
mov ebp, dword [esp + 0x44]
cmp byte [esi + ebx], 0
jne 0x416f68
cmp byte [esi + edi + 1], 0x5d
je 0x416f80
push 0x5b
push ebp
call dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
jne 0x416ea3
jmp 0x416f8c
sub esi, dword [esp + 0x10]
lea esi, [esi + edi + 2]
test esi, esi
jne 0x416fb7
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 0x416fa7
mov eax, 0x42a800
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
push ecx
push eax
push edx
jmp 0x4170da
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 0x4170b4
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, esi
sub edx, ecx
cmp edx, eax
jge 0x4170b4
movsx eax, byte [esi]
mov edi, dword [sym.imp.MSVCRT.dll_isspace]
push eax
call edi
add esp, 4
test eax, eax
je 0x417010
movsx ecx, byte [esi + 1]
inc esi
push ecx
call edi
add esp, 4
test eax, eax
jne 0x417001
mov al, byte [esi]
cmp al, 0x5b
je 0x4170b4
movsx edx, al
push edx
call dword [sym.imp.MSVCRT.dll_toupper]
movsx ecx, byte [esp + 0x5c]
add esp, 4
cmp eax, ecx
jne 0x41709d
mov al, byte [ebx + 1]
lea edi, [ebx + 1]
test al, al
mov dword [esp + 0x44], 1
je 0x41707f
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 0x41707b
mov edx, dword [esp + 0x44]
mov al, byte [edi + 1]
inc edx
inc edi
test al, al
mov dword [esp + 0x44], edx
jne 0x417046
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
cmp byte [eax + ebx], 0
jne 0x41709d
add esi, eax
mov al, byte [esi]
cmp al, 9
je 0x417095
cmp al, 0x20
jne 0x417098
inc esi
jmp 0x41708b
cmp byte [esi], 0x3d
je 0x4170f8
inc esi
push 0xa
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
jne 0x416fda
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 0x4170cf
mov eax, 0x42a800
mov edx, dword [esp + 0x54]
push edx
push eax
mov eax, dword [esp + 0x58]
push eax
call fcn.00411fe0
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 0x4170f8
cmp al, 0x20
je 0x4170f8
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
xor edi, edi
dec edx
test edx, edx
jle 0x417130
mov ecx, ebx
sub ecx, esi
mov al, byte [esi]
cmp al, 0xd
mov byte [ecx + esi], al
je 0x417130
mov al, byte [esi]
cmp al, 0xa
je 0x417130
test al, al
je 0x417130
inc edi
inc esi
cmp edi, edx
jl 0x417117
dec edi
js 0x41714a
mov esi, dword [sym.imp.MSVCRT.dll_isspace]
movsx eax, byte [edi + ebx]
push eax
call esi
add esp, 4
test eax, eax
je 0x417165
dec edi
jns 0x417139
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 0x41714a
mov byte [edi + ebx + 1], 0
mov al, byte [ebx]
cmp al, 0x22
jne 0x41718f
cmp byte [edi + ebx], 0x22
jne 0x41718f
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