Function at 0x40ff4f
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
cmp dword [ebp + 0x10], 0
push ebx
push esi
push edi
jge 0x40ff69
push 5
call fcn.00408d43
pop ecx
mov eax, dword [ebp + 0x24]
lea ecx, [ebp - 0xc0]
xor ebx, ebx
mov byte [eax], bl
call fcn.00406aa8
mov esi, dword [ebp + 8]
push 2
pop edi
push 0x80
push 3
push esi
lea ecx, [ebp - 0xc0]
call fcn.00441dba
push eax
call fcn.004346fc
pop ecx
test al, al
jne 0x40fff9
push dword [ebp + 0x10]
lea ecx, [ebp - 0xbc]
push dword [ebp + 0xc]
call fcn.0044288c
test al, al
je 0x40fff9
lea ecx, [ebp - 0xc0]
call fcn.0043c220
mov eax, dword [0x4a96d8]
and eax, 0x40000
or eax, ebx
je 0x41004c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.0043da11
add esp, 0xc
test al, al
jne 0x41004c
test edi, edi
jne 0x410043
call fcn.004479b0
push esi
push dword [ebp + 0x18]
call fcn.0040d54a
pop ecx
pop ecx
jmp 0x4101cf
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x20], eax
cmp edi, 2
jne 0x410037
cmp eax, 3
jne 0x410012
push esi
call fcn.0043c6d5
pop ecx
mov eax, dword [0x4a96d8]
and eax, 0x80000
or eax, ebx
je 0x41003b
lea ecx, [ebp - 0xc0]
call fcn.0043c220
push ebx
push 7
push esi
call fcn.0043d8bb
add esp, 0xc
test edi, edi
je 0x4100b0
push 0x32
call fcn.004479d0
pop ecx
sub edi, 1
jns 0x40ff81
mov edi, dword [ebp + 0x14]
cmp dword [edi + 4], ebx
je 0x410087
cmp dword [edi + 0xc], ebx
jl 0x410087
push 0x80
push 0x301
push esi
lea ecx, [ebp - 0xc0]
call fcn.00441dba
push edi
lea ecx, [ebp - 0xc0]
call fcn.0043c568
push edi
lea ecx, [ebp - 0xc0]
call fcn.0043c5bf
lea ecx, [ebp - 0xc0]
call fcn.0043c220
cmp dword [ebp + 0x1c], 0xffffffff
je 0x4100a9
push 0x1127
push dword [ebp + 0x1c]
push esi
call fcn.0043d943
add esp, 0xc
mov bl, 1
jmp 0x4101cf
lea ecx, [ebp - 0x2c]
call fcn.00426589
lea ecx, [ebp - 0x10]
call fcn.00426589
push bind
push esi
lea ecx, [ebp - 0x10]
call fcn.0042c007
push ebx
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004405ed
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.00423fb2
lea ecx, [ebp - 0x38]
call fcn.00426589
cmp dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x10]
mov edi, 0x47c724
push 0x1f
mov esi, edi
cmovne esi, dword [ebp - 0x2c]
push eax
call fcn.0040781b
push ebx
mov ecx, edi
cmp dword [eax], ebx
cmovne ecx, dword [eax]
mov eax, dword [0x4a3160]
push eax
push esi
push 0x47dfd4
push ecx
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.0042c1c8
add esp, 0x24
lea ecx, [ebp - 0x10]
call fcn.00423fb2
cmp byte [ebp + 0x20], bl
jne 0x410147
mov eax, dword [0x4a96d8]
and eax, 0x800
or eax, ebx
mov al, bl
je 0x410149
mov al, 1
mov esi, dword [ebp - 0x20]
xor ecx, ecx
movzx eax, al
cmp esi, 0x7b
push ebx
push dword [ebp + 8]
cmove eax, ecx
mov dword [ebp - 0x20], eax
call fcn.0043f582
mov byte [ebp - 1], al
lea eax, [ebp - 1]
push eax
call fcn.0043d17e
add esp, 0xc
test al, al
jne 0x4101e1
movsx eax, byte [ebp - 1]
push eax
lea eax, [ebp - 0x38]
push 0x47dfd8
push eax
call fcn.00426030
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.00426589
push ebx
push 0x47d834
push ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004485a9
mov ecx, dword [ebp + 0x18]
lea eax, [ebp - 0x10]
add esp, 0x14
push eax
call fcn.004221df
lea ecx, [ebp - 0x10]
call fcn.00423fb2
lea ecx, [ebp - 0x38]
call fcn.00423fb2
lea ecx, [ebp - 0x2c]
call fcn.00423fb2
lea ecx, [ebp - 0xc0]
call fcn.004070e3
pop edi
pop esi
mov al, bl
pop ebx
leave
ret
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.004478b4
pop ecx
pop ecx
cmp dword [ebp - 0xc], ebx
jle 0x410204
push dword [0x4a3164]
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x38]
call fcn.0042270b
lea ecx, [ebp - 0x10]
call fcn.00423fb2
mov byte [ebp - 2], 1
cmp byte [ebp - 0x20], bl
je 0x41018c
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.0043f41c
mov esi, 0x47c720
push ebx
mov ecx, esi
cmp dword [eax], ebx
push ebx
cmovne ecx, dword [eax]
lea eax, [ebp - 0x1c]
push ecx
push eax
call fcn.0043dd65
add esp, 0x18
lea ecx, [ebp - 0x10]
call fcn.00423fb2
cmp dword [ebp - 0x18], ebx
jle 0x4103e1
push dword [ebp + 0x10]
cmp dword [ebp - 0x1c], ebx
mov eax, esi
push dword [ebp + 0xc]
cmovne eax, dword [ebp - 0x1c]
push eax
call fcn.0043dcea
push eax
call fcn.004346fc
add esp, 0x10
test al, al
jne 0x4103e1
cmp dword [ebp - 0x1c], ebx
mov eax, esi
push ebx
cmovne eax, dword [ebp - 0x1c]
push eax
call fcn.0044f5f0
mov eax, dword [ebp + 0x14]
pop ecx
pop ecx
cmp dword [eax + 4], ebx
je 0x4102e7
cmp dword [eax + 0xc], ebx
jl 0x4102e7
lea ecx, [ebp - 0x13c]
call fcn.00406aa8
cmp dword [ebp - 0x1c], ebx
lea ecx, [ebp - 0x13c]
push 0x80
mov eax, esi
cmovne eax, dword [ebp - 0x1c]
push 0x301
push eax
call fcn.00441dba
push dword [ebp + 0x14]
lea ecx, [ebp - 0x13c]
call fcn.0043c568
push dword [ebp + 0x14]
lea ecx, [ebp - 0x13c]
call fcn.0043c5bf
lea ecx, [ebp - 0x13c]
call fcn.004070e3
lea ecx, [ebp - 0x10]
call fcn.00426589
push ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004405ed
cmp dword [ebp - 0x1c], ebx
mov eax, esi
cmovne eax, dword [ebp - 0x1c]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.0043f9ad
add esp, 0x14
lea ecx, [ebp - 0x1c]
push eax
call fcn.00407495
lea ecx, [ebp - 0x44]
call fcn.00423fb2
call fcn.004479b0
cmp dword [ebp - 0x1c], ebx
push 8
cmovne esi, dword [ebp - 0x1c]
sub esp, 0xc
mov ecx, esp
push dword [ebp + 8]
call fcn.00406f3d
push esi
call fcn.0043e6fc
add esp, 0x14
test al, al
jne 0x41039c
lea eax, [ebp - 0x44]
push eax
call fcn.00447992
mov edx, edi
mov ecx, edi
cmp dword [eax], ebx
cmovne edx, dword [eax]
mov eax, edi
cmp dword [ebp - 0x10], ebx
push edx
cmovne ecx, dword [ebp - 0x10]
cmp dword [ebp - 0x2c], ebx
push ecx
cmovne eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x38]
push 0x47e0c8
push eax
call fcn.00426030
add esp, 0x18
lea ecx, [ebp - 0x44]
call fcn.00423fb2
cmp dword [ebp - 0x10], ebx
push ebx
cmovne edi, dword [ebp - 0x10]
push edi
call fcn.0043e32e
pop ecx
pop ecx
jmp 0x4103dc
or dword [0x4a96d8], 0x4000
mov eax, dword [0x4a96dc]
cmp dword [ebp - 0x10], ebx
mov dword [0x4a96dc], eax
mov eax, edi
cmovne eax, dword [ebp - 0x10]
cmp dword [ebp - 0x2c], ebx
push eax
cmovne edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x38]
push edi
push 0x47e160
push eax
mov byte [ebp - 2], bl
call fcn.00426030
mov eax, dword [ebp + 0x24]
add esp, 0x10
mov byte [eax], 1
lea ecx, [ebp - 0x10]
jmp 0x41040e
lea eax, [ebp - 0x44]
push eax
call fcn.00447992
mov ecx, edi
cmp dword [eax], ebx
cmovne ecx, dword [eax]
lea eax, [ebp - 0x38]
cmp dword [ebp - 0x2c], ebx
push ecx
cmovne edi, dword [ebp - 0x2c]
push edi
push 0x47e010
push eax
call fcn.00426030
add esp, 0x14
lea ecx, [ebp - 0x44]
call fcn.00423fb2
lea ecx, [ebp - 0x1c]
call fcn.00423fb2
cmp byte [ebp - 2], bl
jne 0x41018c
lea eax, [ebp - 0x38]
push eax
call fcn.0040d433
pop ecx
jmp 0x4101bf