Function at 0x40b15c
Capabilities:
Check if file exists

Disassembly:
push 0x48
mov eax, 0x41ff81
call fcn.00416cfa
mov esi, ecx
mov edi, dword [ebp + 8]
push edi
call fcn.0040bb7d
mov ebx, eax
test ebx, ebx
jl 0x40b351
lea eax, [edi + ebx*2]
cmp word [eax + 2], 0
je 0x40b351
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040921b
and dword [ebp - 4], 0
push edi
lea ecx, [ebp - 0x20]
call fcn.0040921b
push ebx
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.0040a098
mov eax, dword [ebp - 0x28]
cmp eax, 6
jbe 0x40b1cc
mov ecx, dword [ebp - 0x2c]
lea eax, [ecx + eax*2 - 0xc]
push 0x42193c
push eax
call fcn.00408de8
test al, al
jne 0x40b1d9
push str.:_DATA
lea ecx, [ebp - 0x2c]
call fcn.00409383
push dword [ebp - 0x20]
call fcn.0040bad4
test al, al
mov eax, dword [ebp - 0x20]
je 0x40b21e
cmp ebx, 2
je 0x40b1f9
cmp ebx, 3
jne 0x40b21e
cmp word [eax + 4], 0x5c
jne 0x40b21e
mov ecx, esi
call fcn.0040b076
lea ecx, [esi + 0x28]
and dword [ecx + 4], 0
mov eax, dword [ecx]
xor edx, edx
mov word [eax], dx
cmp ebx, 2
jne 0x40b22e
lea eax, [ebp - 0x20]
push eax
call fcn.004092cf
jmp 0x40b22e
push eax
mov ecx, esi
call fcn.0040b15c
test al, al
je 0x40b33f
and dword [esi + 0x20], 0xfffffbef
and dword [esi], 0
and dword [esi + 4], 0
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0040b12f
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.004091f7
jmp 0x40b284
cmp byte [ebp + 0xb], 0
je 0x40b2d2
push dword [ebp - 0x2c]
push dword [ebp - 0x54]
call fcn.004096f7
test al, al
jne 0x40b30c
push dword [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.0040983f
pop ecx
lea ecx, [ebp - 0x54]
call fcn.004091f7
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 3
call fcn.0040b038
test al, al
jne 0x40b256
push dword [ebp - 0x54]
call fcn.0040983f
push dword [ebp - 0x38]
call fcn.0040983f
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.0040adb7
push dword [ebp - 0x20]
call fcn.0040983f
push dword [ebp - 0x2c]
call fcn.0040983f
pop ecx
pop ecx
xor al, al
call fcn.00416dd2
ret 4
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
push dword [ebp - 0x54]
call fcn.0040983f
push dword [ebp - 0x38]
call fcn.0040983f
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.0040adb7
push dword [ebp - 0x20]
call fcn.0040983f
push dword [ebp - 0x2c]
call fcn.0040983f
pop ecx
pop ecx
mov al, bl
jmp 0x40b2ca
mov eax, dword [ebp - 0x50]
cmp eax, 7
jbe 0x40b320
add eax, 0xfffffffa
push eax
lea ecx, [ebp - 0x54]
call fcn.0040a098
lea eax, [ebp - 0x54]
push eax
lea ecx, [esi + 0x28]
call fcn.004093bf
mov eax, dword [ebp - 0x44]
mov dword [esi], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 4], eax
mov byte [esi + 0x24], 1
mov bl, 1
jmp 0x40b2dc
push dword [ebp - 0x20]
call fcn.0040983f
push dword [ebp - 0x2c]
call fcn.0040983f
pop ecx
pop ecx
or dword [ebp + 8], 0xffffffff
push esi
push edi
lea ecx, [ebp + 8]
mov dword [ebp - 4], 4
call fcn.0040add7
test al, al
je 0x40b379
lea ecx, [ebp + 8]
call fcn.0040adb7
mov al, 1
jmp 0x40b2ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp eax, 2
je 0x40b3a1
cmp eax, 0x35
je 0x40b3a1
cmp eax, 0x43
je 0x40b3a1
cmp eax, 0x7b
je 0x40b3a1
cmp eax, 0xa1
jne 0x40b505
push edi
xor ebx, ebx
call fcn.0040bb07
test al, al
je 0x40b3b0
push 4
pop ebx
movzx eax, word [edi]
cmp ax, 0x5c
je 0x40b3bf
cmp ax, 0x2f
jne 0x40b3fb
cmp word [edi + 2], 0
jne 0x40b3fb
push edi
call fcn.0040b099
mov edx, eax
cmp edx, 0xffffffff
je 0x40b505
test dl, 0x10
je 0x40b505
mov ecx, esi
call fcn.0040b076
and dword [esi + 0x2c], 0
mov eax, dword [esi + 0x28]
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 0x20], edx
jmp 0x40b36a
lea eax, [edi + ebx*2]
push eax
mov dword [ebp - 0x10], eax
call fcn.0040b9a3
test al, al
je 0x40b452
cmp word [edi + ebx*2 + 6], 0
jne 0x40b452
push edi
call fcn.0040b099
mov edx, eax
cmp edx, 0xffffffff
je 0x40b505
test dl, 0x10
je 0x40b505
mov ecx, esi
call fcn.0040b076
push dword [ebp - 0x10]
mov dword [esi + 0x20], edx
add esi, 0x28
mov ecx, esi
call fcn.00409276
push 2
mov ecx, esi
call fcn.0040a098
jmp 0x40b36a
push edi
call fcn.0040ba6c
test eax, eax
jbe 0x40b505
lea eax, [edi + eax*2]
cmp word [eax], 0
mov dword [ebp - 0x10], eax
je 0x40b505
push eax
call fcn.0040b946
test eax, eax
jge 0x40b505
push edi
lea ecx, [ebp - 0x38]
call fcn.0040921b
push 0x5c
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 5
call fcn.00408962
push 0x2a
lea ecx, [ebp - 0x38]
call fcn.00408962
push esi
push dword [ebp - 0x38]
lea ecx, [ebp + 8]
xor bl, bl
call fcn.0040add7
test al, al
je 0x40b4dd
push 0x4218e8
lea ebx, [esi + 0x28]
push ebx
call fcn.00409f4e
test al, al
je 0x40b4db
push dword [ebp - 0x10]
mov ecx, ebx
call fcn.00409276
push dword [ebp - 0x38]
call fcn.0040983f
pop ecx
jmp 0x40b36a
mov bl, 1
push edi
call fcn.0040b099
mov edx, eax
test bl, bl
jne 0x40b509
cmp edx, 0xffffffff
je 0x40b4f3
test dl, 0x10
jne 0x40b509
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x38]
call fcn.0040983f
pop ecx
xor bl, bl
jmp 0x40b537
mov ecx, esi
call fcn.0040b076
cmp edx, 0xffffffff
je 0x40b51a
mov dword [esi + 0x20], edx
jmp 0x40b521
mov dword [esi + 0x20], 0x10
push dword [ebp - 0x10]
lea ecx, [esi + 0x28]
call fcn.00409276
push dword [ebp - 0x38]
call fcn.0040983f
pop ecx
mov bl, 1
lea ecx, [ebp + 8]
call fcn.0040adb7
jmp 0x40b308