Function at 0x40f840
Capabilities:
Check if file exists

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0xc
push ebp
push edi
push eax
call fcn.00403e90
xor edi, edi
add esp, 4
mov ebp, eax
cmp dword [0x43d164], edi
je 0x40f88b
cmp ebp, edi
je 0x40f876
mov eax, dword [ebp]
dec eax
jne 0x40f873
push ebp
call fcn.004013c0
add esp, 4
jmp 0x40f876
mov dword [ebp], eax
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x439178
jmp 0x40f90d
push 0x140
call fcn.00401280
add esp, 4
cmp eax, edi
je 0x40f8a9
mov ecx, eax
mov dword [esp + 0xc], eax
mov eax, dword [0x43d148]
jmp 0x40f8e1
push 0x437410
push 0x4373fc
call fcn.00401610
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x4390f4
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
add esp, 8
xor ecx, ecx
mov dword [0x43d148], eax
mov dword [esp + 0xc], ecx
cmp ecx, edi
jne 0x40f925
cmp ebp, edi
je 0x40f902
mov eax, dword [ebp]
dec eax
jne 0x40f8fa
push ebp
call fcn.004013c0
add esp, 4
jmp 0x40f8fd
mov dword [ebp], eax
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x43916c
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
pop edi
mov dword [0x43d148], eax
xor eax, eax
pop ebp
add esp, 0xc
ret
push ebx
push 0x10
call fcn.00401280
mov ebx, eax
add esp, 4
mov dword [esp + 0xc], ebx
cmp ebx, edi
je 0x40f9b0
xor eax, eax
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
inc dword [ebx]
mov eax, dword [ebx + 0xc]
mov dword [ebx + 8], edi
inc dword [0x4376fc]
mov dword [ebx + 0xc], 0x4376fc
cmp eax, edi
je 0x40f970
mov ecx, dword [eax]
dec ecx
mov dword [eax], ecx
jne 0x40f970
push eax
call fcn.004178b0
add esp, 4
mov eax, dword [ebp + 0xc]
push esi
push 1
inc eax
push edi
push eax
call fcn.00401a40
add esp, 0xc
cmp eax, edi
jne 0x40fa23
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x4399f4
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
mov dword [0x43d148], eax
xor esi, esi
jmp 0x40fa44
push 0x437410
push 0x4373fc
call fcn.00401610
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x439100
mov dword [eax*8 + 0x43de24], edi
inc eax
add esp, 8
and eax, 0x7f
mov dword [0x43d148], eax
cmp ebp, edi
je 0x40f9ff
mov eax, dword [ebp]
dec eax
jne 0x40f9f7
push ebp
call fcn.004013c0
add esp, 4
jmp 0x40f9fa
mov dword [ebp], eax
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x439160
mov dword [eax*8 + 0x43de24], edi
inc eax
pop ebx
and eax, 0x7f
pop edi
mov dword [0x43d148], eax
xor eax, eax
pop ebp
add esp, 0xc
ret
mov ecx, dword [ebp + 0xc]
mov byte [ecx + eax], 0
dec ecx
cmp ecx, edi
jl 0x40fa3d
nop
dec ecx
mov dl, byte [ecx + ebp + 0x11]
mov byte [ecx + eax + 1], dl
jns 0x40fa30
xor edi, edi
mov esi, eax
mov eax, dword [0x43d148]
cmp dword [0x43d164], edi
je 0x40fa6b
mov dword [eax*8 + 0x43de20], 0x4399e8
xor edi, edi
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
mov dword [0x43d148], eax
jmp 0x40fa8d
mov eax, dword [esp + 0x14]
push eax
push esi
call fcn.00416f90
add esp, 8
mov edi, eax
test esi, esi
je 0x40fa88
push esi
call fcn.004013c0
add esp, 4
mov eax, dword [0x43d148]
cmp dword [0x43d164], 0
mov dword [esp + 0x18], edi
je 0x40fb59
mov esi, dword [0x43d168]
test esi, esi
je 0x40faaf
inc dword [esi]
mov eax, dword [0x43d148]
mov edi, dword [0x43d164]
mov dword [eax*8 + 0x43de20], 0x439154
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
mov dword [0x43d148], eax
cmp edi, 0x437394
je 0x40fae0
cmp edi, 0x437360
jne 0x40fae5
call fcn.00401100
mov eax, dword [0x43d168]
mov dword [0x43d168], 0
test eax, eax
je 0x40fb08
mov ecx, dword [eax]
dec ecx
mov dword [eax], ecx
jne 0x40fb08
push eax
call fcn.00419f20
add esp, 4
mov dword [0x43d164], 0
test esi, esi
je 0x40fb18
inc dword [esi]
mov eax, dword [ebp]
dec eax
jne 0x40fb29
push ebp
call fcn.004013c0
add esp, 4
jmp 0x40fb2c
mov dword [ebp], eax
test esi, esi
je 0x40fb40
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x40fb40
push esi
call fcn.00419f20
add esp, 4
mov eax, dword [ebx]
dec eax
mov dword [ebx], eax
jne 0x410092
push ebx
call fcn.00417760
add esp, 4
jmp 0x410092
mov eax, dword [ebp]
dec eax
jne 0x40fb6a
push ebp
call fcn.004013c0
add esp, 4
jmp 0x40fb6d
mov dword [ebp], eax
cmp edi, 0xffffffff
jne 0x40fc7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 2
je 0x40ff32
mov eax, dword [ebx]
dec eax
mov dword [ebx], eax
jne 0x40fb97
push ebx
call fcn.00417760
add esp, 4
push 0x14
call fcn.00401280
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x40fbf7
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
inc dword [esi]
inc dword [esi]
mov dword [esi + 8], 0x4377e0
mov dword [esi + 0x10], edi
inc dword [esi]
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x40fbd9
push esi
call fcn.00419f20
add esp, 4
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x40ffaf
push esi
call fcn.00419f20
add esp, 4
mov edi, 0x4377e0
jmp 0x410092
mov eax, dword [0x43d168]
inc dword [0x437410]
mov esi, 0x4373fc
mov dword [0x43d164], esi
mov dword [0x43d168], 0x437410
cmp eax, ebx
je 0x40fc2b
mov ecx, dword [eax]
dec ecx
mov dword [eax], ecx
jne 0x40fc2b
push eax
call fcn.00419f20
add esp, 4
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], ebx
mov dword [eax*8 + 0x43de24], esi
inc eax
and eax, 0x7f
mov dword [eax*8 + 0x43de20], 0x43913c
mov dword [eax*8 + 0x43de24], ebx
inc eax
and eax, 0x7f
mov dword [eax*8 + 0x43de20], 0x439148
mov dword [eax*8 + 0x43de24], ebx
pop esi
inc eax
pop ebx
and eax, 0x7f
pop edi
mov dword [0x43d148], eax
xor eax, eax
pop ebp
add esp, 0xc
ret
mov eax, dword [esp + 0x14]
add eax, 0x2c
push eax
call fcn.00407000
add esp, 4
cmp dword [0x43d164], 0
mov esi, eax
jne 0x40fe9f
lea esp, [esp]
cmp esi, 0x437690
jne 0x40fcc4
test esi, esi
je 0x40fe66
mov eax, dword [esi]
dec eax
jne 0x40fd7e
push esi
call fcn.004013c0
jmp 0x40fe63
test esi, esi
je 0x40fd1c
cmp dword [esi + 0xc], 1
jne 0x40fd1c
mov ecx, dword [0x437690]
inc ecx
mov dword [0x437690], ecx
xor eax, eax
lea ecx, [ecx]
mov dl, byte [eax + esi + 0x10]
cmp dl, byte [eax + 0x4376a0]
jne 0x40fd08
inc eax
cmp eax, 1
jl 0x40fce0
lea eax, [ecx - 1]
test eax, eax
jne 0x40fd69
push 0x437690
call fcn.004013c0
add esp, 4
jmp 0x40fd6e
lea eax, [ecx - 1]
test eax, eax
jne 0x40fd62
push 0x437690
call fcn.004013c0
add esp, 4
cmp esi, 0x4376a4
je 0x40fca8
test esi, esi
je 0x40fd9a
cmp dword [esi + 0xc], 2
jne 0x40fd9a
inc dword [0x4376a4]
xor eax, eax
jmp 0x40fd40
mov cl, byte [esi + eax + 0x10]
cmp cl, byte [eax + 0x4376b4]
jne 0x40fd85
inc eax
cmp eax, 2
jl 0x40fd40
mov eax, dword [esi]
dec eax
jne 0x40fdd3
push esi
call fcn.004013c0
add esp, 4
jmp 0x40fdd5
mov dword [0x437690], eax
jmp 0x40fd1c
mov dword [0x437690], eax
mov eax, dword [esi]
dec eax
jne 0x40fd7e
push esi
call fcn.004013c0
jmp 0x40fe63
mov dword [esi], eax
jmp 0x40fe66
mov eax, dword [0x4376a4]
dec eax
jne 0x40fdcc
push 0x4376a4
call fcn.004013c0
add esp, 4
mov eax, dword [ebx + 0xc]
mov ebp, dword [ebx + 8]
lea edi, [ebp + 1]
test eax, eax
je 0x40fda9
inc dword [eax]
cmp dword [eax + 8], edi
mov ecx, dword [eax]
setge bl
dec ecx
mov dword [eax], ecx
jne 0x40fdbf
push eax
call fcn.004178b0
add esp, 4
test bl, bl
je 0x40fdf0
mov edx, dword [esp + 0x10]
mov dword [edx + 8], edi
jmp 0x40fe0b
mov dword [0x4376a4], eax
jmp 0x40fd9a
mov dword [esi], eax
mov eax, dword [0x4376a4]
dec eax
jne 0x40fde9
push 0x4376a4
call fcn.004013c0
jmp 0x40fe63
mov dword [0x4376a4], eax
jmp 0x40fe66
mov eax, dword [esp + 0x10]
push edi
push eax
call fcn.00402940
add esp, 8
cmp dword [0x43d164], 0
jne 0x40fec0
mov ecx, dword [esp + 0x10]
mov edi, dword [ecx + 0xc]
test edi, edi
je 0x40fe18
inc dword [edi]
mov eax, dword [edi + ebp*4 + 0xc]
test esi, esi
je 0x40fe22
inc dword [esi]
mov dword [edi + ebp*4 + 0xc], esi
test eax, eax
je 0x40fe3c
mov ecx, dword [eax]
dec ecx
jne 0x40fe3a
push eax
call fcn.004013c0
add esp, 4
jmp 0x40fe3c
mov dword [eax], ecx
test esi, esi
je 0x40fe52
mov eax, dword [esi]
dec eax
jne 0x40fe50
push esi
call fcn.004013c0
add esp, 4
jmp 0x40fe52
mov dword [esi], eax
test edi, edi
je 0x40fe66
mov eax, dword [edi]
dec eax
mov dword [edi], eax
jne 0x40fe66
push edi
call fcn.004178b0
add esp, 4
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
push edi
push esi
call fcn.00416fb0
add esp, 8
test eax, eax
je 0x40ff18
lea eax, [edi + 0x2c]
push eax
call fcn.00407000
mov ebx, dword [esp + 0x14]
add esp, 4
cmp dword [0x43d164], 0
mov esi, eax
je 0x40fca0
xor ebp, ebp
cmp esi, ebp
je 0x40fff8
mov eax, dword [esi]
dec eax
jne 0x40fff6
push esi
call fcn.004013c0
add esp, 4
jmp 0x40fff8
test esi, esi
je 0x40fed6
mov eax, dword [esi]
dec eax
jne 0x40fed4
push esi
call fcn.004013c0
add esp, 4
jmp 0x40fed6
mov dword [esi], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
dec eax
mov dword [ecx], eax
jne 0x40feea
push ecx
call fcn.00417760
add esp, 4
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x439124
mov dword [eax*8 + 0x43de24], 0
pop esi
inc eax
pop ebx
and eax, 0x7f
pop edi
mov dword [0x43d148], eax
xor eax, eax
pop ebp
add esp, 0xc
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.00416fd0
add esp, 4
cmp edi, 0x12
jne 0x40ff49
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push edx
call fcn.004013c0
add esp, 4
pop esi
mov eax, ebx
pop ebx
pop edi
pop ebp
add esp, 0xc
ret
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
dec eax
mov dword [ecx], eax
jne 0x40ff5d
push ecx
call fcn.00417760
add esp, 4
push 0x14
call fcn.00401280
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x40ffb9
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
inc dword [esi]
inc dword [esi]
mov dword [esi + 8], 0x4377e0
mov dword [esi + 0x10], edi
inc dword [esi]
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x40ff9f
push esi
call fcn.00419f20
add esp, 4
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x40ffaf
push esi
call fcn.00419f20
add esp, 4
mov edi, 0x4377e0
jmp 0x410092
push 0x437410
push 0x4373fc
call fcn.00401610
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0x43910c
mov dword [eax*8 + 0x43de24], ebx
inc eax
add esp, 8
and eax, 0x7f
mov dword [eax*8 + 0x43de20], 0x439118
jmp 0x40fc63
mov dword [esi], eax
mov esi, dword [0x43d168]
cmp esi, ebp
je 0x410004
inc dword [esi]
mov eax, dword [0x43d148]
mov edi, dword [0x43d164]
mov dword [eax*8 + 0x43de20], 0x439130
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
mov dword [0x43d148], eax
cmp edi, 0x437394
je 0x41003a
cmp edi, 0x437360
jne 0x41003f
call fcn.00401100
mov eax, dword [0x43d168]
mov dword [0x43d168], ebp
cmp eax, ebp
je 0x41005e
mov ecx, dword [eax]
dec ecx
mov dword [eax], ecx
jne 0x41005e
push eax
call fcn.00419f20
add esp, 4
mov dword [0x43d164], ebp
cmp esi, ebp
je 0x41006a
inc dword [esi]
mov eax, dword [ebx]
dec eax
mov dword [ebx], eax
jne 0x41007a
push ebx
call fcn.00417760
add esp, 4
cmp esi, ebp
je 0x410090
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x410092
push esi
call fcn.00419f20
add esp, 4
jmp 0x410092
xor esi, esi
mov eax, dword [esp + 0x14]
push eax
call fcn.004013c0
add esp, 4
test esi, esi
je 0x4100a5
inc dword [esi]
mov eax, dword [0x43d168]
mov dword [0x43d164], edi
test esi, esi
je 0x4100b6
inc dword [esi]
mov dword [0x43d168], esi
test eax, eax
je 0x4100d0
mov ecx, dword [eax]
dec ecx
mov dword [eax], ecx
jne 0x4100d0
push eax
call fcn.00419f20
add esp, 4
mov eax, dword [0x43d148]
mov dword [eax*8 + 0x43de20], 0xffffffff
mov dword [eax*8 + 0x43de24], edi
inc eax
and eax, 0x7f
mov dword [0x43d148], eax
test esi, esi
je 0x410114
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x410104
push esi
call fcn.00419f20
add esp, 4
mov eax, dword [esi]
dec eax
mov dword [esi], eax
jne 0x410114
push esi
call fcn.00419f20
add esp, 4
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xc
ret