Function at 0x100491a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x100b158]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x20], 1
xor esi, esi
test byte [0x100b9f4], 0x20
mov dword [ebp - 0x1c], esi
mov eax, 0x10017a4
jne 0x1004951
mov eax, 0x10017a0
push eax
push esi
push 0x1001790
lea eax, [ebp - 0x14]
push 0x10
push eax
call fcn.010039ce
add esp, 0x14
test eax, eax
jne 0x100497b
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.API_MS_Win_Core_File_L1_1_0.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10049a8
jmp 0x10049a2
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x10049a2
test byte [ecx + 0x1c], 2
je 0x10049a2
push eax
push 0x1001480
push 0x32
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100279a
inc esi
cmp esi, 0xa
jl 0x100493b
lea eax, [ebp - 0x14]
push 0x100178c
push eax
call dword [sym.imp.msvcrt.dll_fopen]
mov ebx, eax
pop ecx
pop ecx
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x1004c04
test byte [0x100b9f4], 0x20
mov esi, dword [sym.imp.msvcrt.dll_fprintf]
je 0x1004a21
mov eax, dword [0x100b008]
add eax, 0x54
push eax
push 0x1001788
push ebx
call esi
xor ebx, ebx
add esp, 0xc
cmp dword [edi], ebx
jbe 0x1004a06
movzx eax, byte [edi + ebx]
push eax
push 0x1001780
push dword [ebp - 0x18]
call esi
add esp, 0xc
inc ebx
cmp ebx, dword [edi]
jb 0x10049ef
push 0x100177c
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x18]
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 0xc
jmp 0x1004c6f
push 0x1001754
push ebx
call esi
test byte [0x100b9f4], 1
pop ecx
pop ecx
mov eax, 0x1001708
jne 0x1004a3e
mov eax, 0x10016cc
push eax
push 0x10016c4
push ebx
call esi
add esp, 0xc
test byte [0x100b9f4], 1
je 0x1004a69
mov eax, dword [0x100b008]
add eax, 0x54
push eax
push 0x10016b8
push ebx
call esi
add esp, 0xc
jmp 0x1004a87
mov eax, dword [0x100b9c8]
cmp eax, dword [0x100b9cc]
jle 0x1004a7d
push 0x10016a4
jmp 0x1004a82
push 0x1001694
push ebx
call esi
pop ecx
pop ecx
xor ebx, ebx
cmp dword [edi], ebx
jbe 0x1004ac9
test ebx, ebx
jbe 0x1004aa2
test bl, 0xf
jne 0x1004aa2
push 0x1001680
push dword [ebp - 0x18]
call esi
pop ecx
pop ecx
movzx eax, byte [edi + ebx]
inc ebx
push eax
push 0x1001780
push dword [ebp - 0x18]
call esi
add esp, 0xc
cmp ebx, dword [edi]
jae 0x1004ac9
push 0x100167c
push dword [ebp - 0x18]
call esi
pop ecx
pop ecx
cmp ebx, dword [edi]
jb 0x1004a8d
push 0x100177c
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x18]
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 0xc
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push 0x100166c
push 0x10
push eax
call fcn.010039ce
add esp, 0x10
test eax, eax
jne 0x1004c75
lea eax, [ebp - 0x14]
push 0x100178c
push eax
call dword [sym.imp.msvcrt.dll_fopen]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x1004c35
and dword [ebp - 0x18], 0
xor eax, eax
cmp ax, word [edi + 0x1c]
jae 0x1004b3e
push dword [ebp - 0x18]
push 0x1001664
push ebx
call esi
movzx eax, word [edi + 0x1c]
add esp, 0xc
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jl 0x1004b24
push 0x100177c
push ebx
call esi
and dword [ebp - 0x1c], 0
xor eax, eax
pop ecx
pop ecx
cmp ax, word [edi + 0x1e]
jae 0x1004bf7
push dword [ebp - 0x1c]
push 0x1001660
push ebx
call esi
movzx eax, word [edi + 0x1c]
and dword [ebp - 0x18], 0
add esp, 0xc
test eax, eax
jle 0x1004b9c
imul eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
movzx ecx, word [edi + eax*8 + 0x22]
movzx eax, word [edi + eax*8 + 0x20]
push ecx
push eax
push 0x1001658
push ebx
call esi
movzx eax, word [edi + 0x1c]
add esp, 0x10
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jl 0x1004b72
push 0x100177c
push ebx
call esi
movzx eax, word [edi + 0x1c]
and dword [ebp - 0x18], 0
pop ecx
pop ecx
test eax, eax
jle 0x1004bdd
imul eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
lea eax, [edi + eax*8]
movzx ecx, word [eax + 0x26]
movzx eax, word [eax + 0x24]
push ecx
push eax
push 0x1001658
push ebx
call esi
movzx eax, word [edi + 0x1c]
add esp, 0x10
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jl 0x1004bb2
push 0x100177c
push ebx
call esi
movzx eax, word [edi + 0x1e]
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], eax
pop ecx
pop ecx
jl 0x1004b58
push ebx
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
jmp 0x1004c9c
lea eax, [ebp - 0x14]
push eax
push 2
push 0
push dword [0x100b9f0]
call fcn.0100441e
add esp, 0x10
mov eax, dword [section..data]
cmp eax, section..data
je 0x1004c6f
test byte [eax + 0x1c], 4
je 0x1004c6f
push 0x1001480
push 0x33
jmp 0x1004c64
lea eax, [ebp - 0x14]
push eax
push 2
push 0
push dword [0x100b9f0]
call fcn.0100441e
add esp, 0x10
mov eax, dword [section..data]
cmp eax, section..data
je 0x1004c6f
test byte [eax + 0x1c], 4
je 0x1004c6f
push 0x1001480
push 0x34
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002595
and dword [ebp - 0x20], 0
jmp 0x1004c9c
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1004c9c
test byte [ecx + 0x1c], 2
je 0x1004c9c
push eax
push 0x1001480
push 0x35
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0100279a
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100803e
leave
ret 4