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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x42733c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ebx
xor edx, edx
push esi
or eax, 0xffffffff
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x218], ecx
mov ebx, edx
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x214], edx
mov dword [ebp - 0x220], edx
cmp dword [0x4287d4], edx
jne 0x4119f3
test edi, edi
je 0x4119eb
cmp byte [edi], 0x2f
jne 0x4119eb
cmp byte [edi + 1], 0x2f
je 0x4119f3
mov dword [ebp - 0x21c], edx
jmp 0x4119fd
mov dword [ebp - 0x21c], 1
mov byte [ebp - 0x20c], dl
mov byte [ebp - 0x108], dl
test ecx, ecx
jne 0x411a19
lea ecx, [ebp - 0x224]
mov dword [ebp - 0x218], ecx
push 0x524
mov dword [ecx], 0x2b3
push dword [0x429eb0]
call fcn.00413857
mov esi, eax
test esi, esi
je 0x411e5a
test edi, edi
jne 0x411a42
mov edi, 0x4015ec
push edi
cmp dword [ebp - 0x21c], ebx
je 0x411a71
mov edi, 0x104
push edi
push esi
call fcn.00419fc8
add esp, 0xc
push 0x2f
push esi
call fcn.0040d2ca
mov ebx, eax
test ebx, ebx
je 0x411e25
mov byte [ebx], 0
jmp 0x411ad2
call fcn.004097a6
test eax, eax
je 0x411a8c
push edi
mov edi, 0x104
push edi
push esi
call fcn.00419fc8
add esp, 0xc
jmp 0x411ad2
push 0x5c
push edi
call fcn.0040d2ca
mov dword [ebp - 0x220], eax
test eax, eax
jne 0x411ab9
push 0x4015ec
push 0x104
push esi
call fcn.00419fc8
add esp, 0xc
mov dword [ebp - 0x220], edi
jmp 0x411acd
sub eax, edi
mov ecx, 0x103
cmp eax, ecx
cmovbe ecx, eax
push ecx
push edi
push esi
call fcn.0040d262
mov edi, 0x104
mov eax, 0x401d20
mov ax, word [eax]
cmp ax, word [esi]
jne 0x411ae9
mov dword [esi + 0x518], 1
mov eax, dword [ebp - 0x21c]
test eax, eax
jne 0x411b21
cmp dword [0x4287d4], eax
jne 0x411b21
cmp dword [0x4287d8], eax
je 0x411b13
cmp dword [0x4287d0], eax
jne 0x411b13
and dword [esi + 0x51c], eax
jmp 0x411b30
mov eax, dword [esi + 0x518]
mov dword [esi + 0x51c], eax
jmp 0x411b30
and dword [esi + 0x51c], 0
test eax, eax
jne 0x411c7e
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.00419fc8
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x411b46
sub ecx, edx
cmp byte [ecx + esi - 1], 0x5c
je 0x411b6b
push 0x401614
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0041a027
add esp, 0xc
push edi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.0041b176
add esp, 0xc
test eax, eax
je 0x411e25
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x411b93
sub ecx, edx
lea ebx, [ebp - 0x108]
add ebx, ecx
cmp dword [0x4287cc], 0
jne 0x411c7e
push 0x401628
push edi
push ebx
call fcn.00419fc8
add esp, 0xc
xor eax, eax
push eax
push eax
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x210], eax
cmp eax, 0xffffffff
jne 0x411d9a
jmp 0x411c7e
push 0x401d24
push 7
push ebx
call fcn.00419fc8
add esp, 0xc
xor eax, eax
push eax
push eax
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x210], edi
cmp edi, 0xffffffff
jne 0x411c94
mov byte [ebx], 0
mov cl, byte [ebp - 0x108]
xor ebx, ebx
lea eax, [ebp - 0x108]
test cl, cl
je 0x411d54
cmp cl, 0x5c
jne 0x411c53
mov cl, byte [eax + 1]
test cl, cl
je 0x411c53
cmp cl, 0x5c
je 0x411c53
mov ebx, eax
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x411c40
test ebx, ebx
je 0x411d54
lea eax, [ebp - 0x108]
push eax
mov byte [ebx], cl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x411d54
mov byte [ebx], 0x5c
inc ebx
lea eax, [ebp - 0x108]
mov byte [ebx], 0
cmp ebx, eax
ja 0x411bef
jmp 0x411d54
cmp dword [esi + 0x51c], 0
je 0x411d18
cmp byte [0x428c20], 0
je 0x411ccd
push 0x428c20
lea edi, [esi + 0x104]
push 0x104
push edi
call fcn.00419fc8
add esp, 0xc
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x411cc2
sub edi, ecx
jmp 0x411cfa
lea eax, [ebp - 0x108]
push eax
lea eax, [esi + 0x104]
push 0x104
push eax
call fcn.00419fc8
mov edi, ebx
lea eax, [ebp - 0x108]
add esp, 0xc
sub edi, eax
mov byte [edi + esi + 0x104], 0
test edi, edi
js 0x411d12
cmp byte [edi + esi + 0x103], 0x5c
je 0x411d12
mov word [edi + esi + 0x104], 0x5c
mov edi, dword [ebp - 0x210]
mov eax, dword [0x4287d8]
neg eax
sbb eax, eax
not eax
lea ecx, [ebp - 0x108]
and eax, ecx
push eax
mov byte [ebx], 0
call fcn.004126c0
mov dword [esi + 0x520], eax
test eax, eax
jne 0x411d4a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x411e25
mov dword [esi + 0x514], 1
cmp dword [esi + 0x514], 0
jne 0x411d8b
cmp dword [0x4287cc], 0
je 0x411d8b
push 0
call fcn.004126c0
mov dword [esi + 0x520], eax
test eax, eax
je 0x411d8b
mov dword [esi + 0x514], 1
mov dword [ebp - 0x214], 1
mov eax, dword [ebp - 0x210]
cmp eax, 0xffffffff
je 0x411e1c
push eax
mov ecx, esi
call fcn.004129f1
mov ebx, dword [ebp - 0x220]
mov dword [ebp - 0x214], eax
test ebx, ebx
je 0x411e0f
push 0x2a
push ebx
call fcn.0040d234
test eax, eax
jne 0x411dca
push 0x3f
push ebx
call fcn.0040d234
test eax, eax
je 0x411e0f
lea edi, [esi + 0x208]
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x411dd5
sub ecx, edx
cmp byte [ecx + esi + 0x207], 0x5c
je 0x411e00
cmp byte [ebx], 0x5c
je 0x411e00
push 0x401614
push 0x104
push edi
call fcn.0041a027
add esp, 0xc
push ebx
push 0x104
push edi
call fcn.0041a027
add esp, 0xc
mov eax, dword [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x214], 0
jne 0x411e4f
cmp dword [esi + 0x514], 0
je 0x411e3a
mov eax, dword [ebp - 0x218]
mov dword [eax], 0x325
push 0x524
push esi
push dword [0x429eb0]
call fcn.00413a00
xor esi, esi
jmp 0x411e58
mov eax, dword [ebp - 0x218]
and dword [eax], 0
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419fba
leave
ret 8