Function at 0x40b22d
Capabilities:
Check if file exists

Disassembly:
push 0x48
mov eax, 0x41fff6
call fcn.00416d7a
mov esi, ecx
mov edi, dword [ebp + 8]
push edi
call fcn.0040bc4e
mov ebx, eax
test ebx, ebx
jl 0x40b422
lea eax, [edi + ebx*2]
cmp word [eax + 2], 0
je 0x40b422
push eax
lea ecx, [ebp - 0x2c]
call fcn.004092eb
and dword [ebp - 4], 0
push edi
lea ecx, [ebp - 0x20]
call fcn.004092eb
push ebx
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.0040a24c
mov eax, dword [ebp - 0x28]
cmp eax, 6
jbe 0x40b29d
mov ecx, dword [ebp - 0x2c]
lea eax, [ecx + eax*2 - 0xc]
push 0x42192c
push eax
call fcn.00408eb8
test al, al
jne 0x40b2aa
push str.:_DATA
lea ecx, [ebp - 0x2c]
call fcn.00409453
push dword [ebp - 0x20]
call fcn.0040bba5
test al, al
mov eax, dword [ebp - 0x20]
je 0x40b2ef
cmp ebx, 2
je 0x40b2ca
cmp ebx, 3
jne 0x40b2ef
cmp word [eax + 4], 0x5c
jne 0x40b2ef
mov ecx, esi
call fcn.0040b165
lea ecx, [esi + 0x28]
and dword [ecx + 4], 0
mov eax, dword [ecx]
xor edx, edx
mov word [eax], dx
cmp ebx, 2
jne 0x40b2ff
lea eax, [ebp - 0x20]
push eax
call fcn.0040939f
jmp 0x40b2ff
push eax
mov ecx, esi
call fcn.0040b22d
test al, al
je 0x40b410
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.0040a904
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.004092c7
jmp 0x40b355
cmp byte [ebp + 0xb], 0
je 0x40b3a3
push dword [ebp - 0x2c]
push dword [ebp - 0x54]
call fcn.004097c7
test al, al
jne 0x40b3dd
push dword [ebp - 0x54]
mov byte [ebp - 4], 2
call fcn.0040990f
pop ecx
lea ecx, [ebp - 0x54]
call fcn.004092c7
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 3
call fcn.0040b127
test al, al
jne 0x40b327
push dword [ebp - 0x54]
call fcn.0040990f
push dword [ebp - 0x38]
call fcn.0040990f
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.0040aea6
push dword [ebp - 0x20]
call fcn.0040990f
push dword [ebp - 0x2c]
call fcn.0040990f
pop ecx
pop ecx
xor al, al
call fcn.00416e52
ret 4
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
push dword [ebp - 0x54]
call fcn.0040990f
push dword [ebp - 0x38]
call fcn.0040990f
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.0040aea6
push dword [ebp - 0x20]
call fcn.0040990f
push dword [ebp - 0x2c]
call fcn.0040990f
pop ecx
pop ecx
mov al, bl
jmp 0x40b39b
mov eax, dword [ebp - 0x50]
cmp eax, 7
jbe 0x40b3f1
add eax, 0xfffffffa
push eax
lea ecx, [ebp - 0x54]
call fcn.0040a24c
lea eax, [ebp - 0x54]
push eax
lea ecx, [esi + 0x28]
call fcn.0040948f
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 0x40b3ad
push dword [ebp - 0x20]
call fcn.0040990f
push dword [ebp - 0x2c]
call fcn.0040990f
pop ecx
pop ecx
or dword [ebp + 8], 0xffffffff
push esi
push edi
lea ecx, [ebp + 8]
mov dword [ebp - 4], 4
call fcn.0040aec6
test al, al
je 0x40b44a
lea ecx, [ebp + 8]
call fcn.0040aea6
mov al, 1
jmp 0x40b39b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
cmp eax, 2
je 0x40b472
cmp eax, 0x35
je 0x40b472
cmp eax, 0x43
je 0x40b472
cmp eax, 0x7b
je 0x40b472
cmp eax, 0xa1
jne 0x40b5d6
push edi
xor ebx, ebx
call fcn.0040bbd8
test al, al
je 0x40b481
push 4
pop ebx
movzx eax, word [edi]
cmp ax, 0x5c
je 0x40b490
cmp ax, 0x2f
jne 0x40b4cc
cmp word [edi + 2], 0
jne 0x40b4cc
push edi
call fcn.0040b188
mov edx, eax
cmp edx, 0xffffffff
je 0x40b5d6
test dl, 0x10
je 0x40b5d6
mov ecx, esi
call fcn.0040b165
and dword [esi + 0x2c], 0
mov eax, dword [esi + 0x28]
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 0x20], edx
jmp 0x40b43b
lea eax, [edi + ebx*2]
push eax
mov dword [ebp - 0x10], eax
call fcn.0040ba74
test al, al
je 0x40b523
cmp word [edi + ebx*2 + 6], 0
jne 0x40b523
push edi
call fcn.0040b188
mov edx, eax
cmp edx, 0xffffffff
je 0x40b5d6
test dl, 0x10
je 0x40b5d6
mov ecx, esi
call fcn.0040b165
push dword [ebp - 0x10]
mov dword [esi + 0x20], edx
add esi, 0x28
mov ecx, esi
call fcn.00409346
push 2
mov ecx, esi
call fcn.0040a24c
jmp 0x40b43b
push edi
call fcn.0040bb3d
test eax, eax
jbe 0x40b5d6
lea eax, [edi + eax*2]
cmp word [eax], 0
mov dword [ebp - 0x10], eax
je 0x40b5d6
push eax
call fcn.0040ba17
test eax, eax
jge 0x40b5d6
push edi
lea ecx, [ebp - 0x38]
call fcn.004092eb
push 0x5c
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 5
call fcn.00408a09
push 0x2a
lea ecx, [ebp - 0x38]
call fcn.00408a09
push esi
push dword [ebp - 0x38]
lea ecx, [ebp + 8]
xor bl, bl
call fcn.0040aec6
test al, al
je 0x40b5ae
push 0x4218e0
lea ebx, [esi + 0x28]
push ebx
call fcn.0040a01f
test al, al
je 0x40b5ac
push dword [ebp - 0x10]
mov ecx, ebx
call fcn.00409346
push dword [ebp - 0x38]
call fcn.0040990f
pop ecx
jmp 0x40b43b
mov bl, 1
push edi
call fcn.0040b188
mov edx, eax
test bl, bl
jne 0x40b5da
cmp edx, 0xffffffff
je 0x40b5c4
test dl, 0x10
jne 0x40b5da
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x38]
call fcn.0040990f
pop ecx
xor bl, bl
jmp 0x40b608
mov ecx, esi
call fcn.0040b165
cmp edx, 0xffffffff
je 0x40b5eb
mov dword [esi + 0x20], edx
jmp 0x40b5f2
mov dword [esi + 0x20], 0x10
push dword [ebp - 0x10]
lea ecx, [esi + 0x28]
call fcn.00409346
push dword [ebp - 0x38]
call fcn.0040990f
pop ecx
mov bl, 1
lea ecx, [ebp + 8]
call fcn.0040aea6
jmp 0x40b3d9