Function at 0x10004140
Capabilities:
Check if file exists
Get file attributes
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x100796ed
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x1008e418]
xor eax, esp
mov dword [esp + 0x1f0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1008e418]
xor eax, esp
push eax
lea eax, [esp + 0x20c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x21c]
lea edi, [esp + 0x1e8]
mov dword [esp + 0x18], eax
call fcn.10004050
xor ebp, ebp
mov dword [esp + 0x214], ebp
mov eax, dword [esp + 0x1ec]
mov edi, 8
cmp dword [esp + 0x200], edi
jae 0x100041b7
lea eax, [esp + 0x1ec]
push eax
push str.cfg_path:_ls
call fcn.10052058
mov eax, dword [esp + 0x1f4]
add esp, 8
cmp dword [esp + 0x200], edi
jae 0x100041dc
lea eax, [esp + 0x1ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1000428e
lea edx, [esp + 0x1e8]
push edx
lea eax, [esp + 0x78]
push eax
call fcn.10001c90
add esp, 8
mov esi, 0x10
mov byte [esp + 0x214], 1
cmp dword [eax + 0x18], esi
jb 0x10004218
mov eax, dword [eax + 4]
jmp 0x1000421b
add eax, 4
push eax
lea ecx, [esp + 0xa8]
push ecx
call fcn.10007870
cmp dword [esp + 0x8c], esi
jb 0x1000423f
mov edx, dword [esp + 0x78]
push edx
call fcn.10056169
add esp, 4
mov dword [esp + 0x8c], 0xf
mov dword [esp + 0x88], ebp
mov byte [esp + 0x78], 0
cmp dword [esp + 0xfc], ebp
jne 0x100042ae
lea ecx, [esp + 0x100]
mov byte [esp + 0x214], 0
call fcn.10007990
lea eax, [esp + 0x100]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.10053c6f
add esp, 4
cmp dword [esp + 0x200], edi
jb 0x100042a7
mov ecx, dword [esp + 0x1ec]
push ecx
call fcn.10056169
add esp, 4
xor al, al
jmp 0x100046f0
and dword [esp + 0x44], 0xfffffe00
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
lea edx, [esp + 0x138]
mov bl, 5
push edx
mov byte [esp + 0x218], bl
call fcn.10048f3d
lea edx, [esp + 0x3c]
lea esi, [esp + 0xa4]
mov ecx, eax
mov byte [esp + 0x214], 6
call fcn.10049041
lea edi, [esp + 0x138]
mov byte [esp + 0x214], bl
call fcn.10004740
cmp byte [esp + 0x44], 7
je 0x10004359
lea esi, [esp + 0x3c]
mov byte [esp + 0x214], 3
call fcn.1004c6f3
lea ecx, [esp + 0x100]
mov byte [esp + 0x214], 0
call fcn.10007990
lea eax, [esp + 0x100]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.10053c6f
add esp, 4
cmp dword [esp + 0x200], 8
jmp 0x10004295
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x40]
call fcn.1004d6c7
mov byte [esp + 0x214], 7
mov esi, dword [esp + 0x30]
cmp esi, dword [esp + 0x34]
jbe 0x1000437e
call fcn.10055ff2
mov ebx, dword [esp + 0x24]
mov edi, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], edi
lea esp, [esp]
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x30], esi
jbe 0x1000439f
call fcn.10055ff2
cmp ebx, ebp
je 0x100043a9
cmp ebx, dword [esp + 0x24]
je 0x100043ae
call fcn.10055ff2
cmp edi, esi
je 0x1000464b
cmp ebx, ebp
jne 0x100043ef
call fcn.10055ff2
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x100043cb
call fcn.10055ff2
push edi
lea ecx, [esp + 0x5c]
call fcn.10001c10
add esp, 4
mov esi, 8
mov byte [esp + 0x214], 8
cmp dword [eax + 0x18], esi
jb 0x100043f3
mov eax, dword [eax + 4]
jmp 0x100043f6
mov eax, dword [ebx]
jmp 0x100043c1
add eax, 4
push eax
push str.patch_in_serv:_ls
call fcn.10052058
add esp, 8
mov byte [esp + 0x214], 7
cmp dword [esp + 0x70], esi
jb 0x1000441f
mov eax, dword [esp + 0x5c]
push eax
call fcn.10056169
add esp, 4
cmp ebx, ebp
jne 0x10004624
call fcn.10055ff2
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x10004438
call fcn.10055ff2
push 0xffffffffffffffff
push ebp
push edi
lea ecx, [esp + 0x1d8]
mov dword [esp + 0x1f0], 0xf
mov dword [esp + 0x1ec], ebp
mov byte [esp + 0x1dc], 0
call fcn.10008960
mov byte [esp + 0x214], 9
mov ecx, dword [esp + 0x1e4]
mov edx, dword [esp + 0x1d0]
cmp ecx, 0x10
jb 0x1000462b
mov dword [esp + 0x14], edx
cmp edx, ebp
je 0x100044ba
mov eax, edx
cmp ecx, 0x10
jae 0x10004497
lea eax, [esp + 0x1d0]
cmp eax, dword [esp + 0x14]
ja 0x100044ba
mov eax, edx
cmp ecx, 0x10
jae 0x100044ab
lea eax, [esp + 0x1d0]
mov ebp, dword [esp + 0x1e0]
add eax, ebp
cmp dword [esp + 0x14], eax
jbe 0x100044d4
call fcn.10055ff2
mov ecx, dword [esp + 0x1e4]
mov ebp, dword [esp + 0x1e0]
mov edx, dword [esp + 0x1d0]
mov eax, edx
cmp ecx, 0x10
jae 0x100044e2
lea eax, [esp + 0x1d0]
lea edi, [eax + ebp]
test edi, edi
je 0x1000450f
mov eax, edx
cmp ecx, 0x10
jae 0x100044f7
lea eax, [esp + 0x1d0]
cmp eax, edi
ja 0x1000450f
mov eax, edx
cmp ecx, 0x10
jae 0x10004509
lea eax, [esp + 0x1d0]
add eax, ebp
cmp edi, eax
jbe 0x10004529
call fcn.10055ff2
mov ecx, dword [esp + 0x1e4]
mov ebp, dword [esp + 0x1e0]
mov edx, dword [esp + 0x1d0]
lea ebx, [esp + 0x1cc]
cmp ecx, 0x10
jb 0x1000463b
mov esi, edx
test edx, edx
je 0x10004565
mov eax, edx
cmp ecx, 0x10
jae 0x1000454d
lea eax, [esp + 0x1d0]
cmp eax, esi
ja 0x10004565
mov eax, edx
cmp ecx, 0x10
jae 0x1000455f
lea eax, [esp + 0x1d0]
add ebp, eax
cmp esi, ebp
jbe 0x1000456a
call fcn.10055ff2
mov ecx, dword [esp + 0x14]
push ecx
lea eax, [esp + 0x1d0]
mov ecx, eax
push ecx
push edi
push ebx
push esi
push eax
lea edx, [esp + 0xa8]
push edx
call fcn.1000d3a0
lea eax, [esp + 0x1e8]
add esp, 0x1c
push eax
lea ecx, [esp + 0x5c]
call fcn.10001c10
add esp, 4
lea ecx, [esp + 0x98]
mov byte [esp + 0x214], 0xa
mov edx, dword [esp + 0x18]
push ecx
push edx
mov ebx, eax
call fcn.10007230
cmp dword [esp + 0x70], 8
jb 0x100045d1
mov eax, dword [esp + 0x5c]
push eax
call fcn.10056169
add esp, 4
mov byte [esp + 0x214], 7
cmp dword [esp + 0x1e4], 0x10
jb 0x100045f3
mov ecx, dword [esp + 0x1d0]
push ecx
call fcn.10056169
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x10004647
call fcn.10055ff2
xor eax, eax
mov edx, dword [esp + 0x20]
cmp edx, dword [eax + 0x10]
jb 0x10004610
call fcn.10055ff2
add dword [esp + 0x20], 0x1c
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
xor ebp, ebp
jmp 0x10004390
mov eax, dword [ebx]
jmp 0x1000442e
lea eax, [esp + 0x1d0]
mov dword [esp + 0x14], eax
jmp 0x10004489
lea esi, [esp + 0x1d0]
jmp 0x1000453f
mov eax, dword [eax]
jmp 0x10004602
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x1c], ebp
mov eax, dword [esp + 0x30]
setne bl
cmp eax, ebp
je 0x1000467b
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
push ecx
call fcn.1000dc60
mov edx, dword [esp + 0x34]
add esp, 4
push edx
call fcn.10056169
add esp, 4
mov eax, dword [esp + 0x24]
push eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
call fcn.10056169
add esp, 4
lea esi, [esp + 0x3c]
mov byte [esp + 0x214], 3
call fcn.1004c6f3
lea ecx, [esp + 0x100]
mov byte [esp + 0x214], 0
call fcn.10007990
lea ecx, [esp + 0x100]
push ecx
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.10053c6f
add esp, 4
cmp dword [esp + 0x200], 8
jb 0x100046ee
mov edx, dword [esp + 0x1ec]
push edx
call fcn.10056169
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x20c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1f0]
xor ecx, esp
call fcn.10055232
add esp, 0x204
ret 4