Function at 0x40477c
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb58
push esi
push edi
xor eax, eax
mov dword [ebp - 4], eax
mov dword [0x416a0e], eax
mov dword [ebp - 8], eax
push 0x4162f6
push dword [0x4169fa]
call fcn.004130ea
push 0x4164fe
push dword [0x4169fe]
call fcn.004130ea
inc dword [0x416996]
push 0
push 0x186
call fcn.0040d931
call fcn.004096f6
test eax, eax
je 0x4058b0
push dword [0x4169fa]
call fcn.0040ea63
test eax, eax
je 0x40480e
inc dword [0x41696e]
test word [0x416928], 0x200
je 0x405862
push 1
push dword [0x4169fa]
push 0x1f7
call fcn.00407f67
jmp 0x405862
push dword [0x4169fa]
call fcn.0041079f
cmp byte [0x4161d4], 2
je 0x404889
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.00411140
cmp eax, 3
je 0x4058b0
cmp byte [0x4161fb], 0
je 0x404866
push 1
push 0x1ab
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.0040f9bc
cmp eax, 3
je 0x4058b0
cmp byte [0x4161fc], 0
je 0x404889
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.0040fc74
cmp eax, 3
je 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fa]
call fcn.00408b96
test eax, eax
jne 0x4048d3
push 0
push dword [0x4169fa]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x404895
cmp eax, 3
je 0x4058b0
jmp 0x405862
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x258]
push eax
push 0x416ef0
call fcn.0041339a
cmp eax, 0xffffffff
jne 0x404932
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x40521a
push 0
push dword [0x4169fa]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x4048df
cmp eax, 3
je 0x4058b0
jmp 0x405862
mov ebx, dword [0x416a0e]
shl ebx, 2
add ebx, dword [0x416a0a]
mov dword [ebx], eax
inc dword [0x416a0e]
test dword [ebp - 0x258], 0x10
je 0x404987
lea eax, [ebp - 0x22c]
push eax
push 0x416ef8
call fcn.00413094
test eax, eax
je 0x40517f
lea eax, [ebp - 0x22c]
push eax
push 0x416efc
call fcn.00413094
test eax, eax
je 0x40517f
lea eax, [ebp - 0x22c]
push eax
call fcn.00406616
test eax, eax
je 0x4058b0
test dword [ebp - 0x258], 0x10
je 0x4049f2
push dword [0x4169fa]
call fcn.0040ea63
test eax, eax
je 0x404a35
inc dword [0x416996]
push 0
push 0
call fcn.0040d931
inc dword [0x41696e]
test word [0x416928], 0x200
je 0x4049e8
push 1
push dword [0x4169fa]
push 0x1f7
call fcn.00407f67
call fcn.004066c0
jmp 0x40517f
push dword [0x4169fa]
call fcn.0040e7fb
test eax, eax
je 0x404a35
inc dword [0x416992]
push 0
push 0
call fcn.0040d931
inc dword [0x416962]
test word [0x416928], 0x200
je 0x4049e8
push 1
push dword [0x4169fa]
push 0x1f6
call fcn.00407f67
jmp 0x4049e8
lea eax, [ebp - 0x22c]
push eax
call fcn.0040666b
test eax, eax
je 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x4a8]
push eax
push dword [0x4169fe]
call fcn.00412d98
cmp eax, 0xffffffff
jne 0x404aa9
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x404d6e
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x404a55
cmp eax, 2
je 0x40515a
jmp 0x4058b0
push eax
call sub.KERNEL32.dll_FindClose
test dword [ebp - 0x258], 0x10
jne 0x404bb6
test dword [ebp - 0x4a8], 0x10
jne 0x404b02
cmp byte [0x4161d4], 2
je 0x40515a
lea eax, [ebp - 0x4a8]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00406829
cmp eax, 4
je 0x40515a
cmp eax, 2
je 0x40515a
jmp 0x4058b0
cmp byte [0x4161d4], 1
je 0x40515a
inc dword [0x416996]
push 0
push 0x18b
call fcn.0040d931
xor ebx, ebx
test word [0x416928], 8
je 0x404b3a
test word [0x416928], 0x400
je 0x404b3a
inc ebx
push ebx
push 0x416982
push 0x416976
push dword [0x4169fe]
call fcn.0040388b
test eax, eax
jne 0x404b87
cmp byte [0x4161d2], 2
jne 0x4058b0
test word [0x416928], 8
je 0x4058b0
push 1
push dword [0x4169fe]
push 0x1ed
call fcn.00407f67
jmp 0x4058b0
test word [0x416928], 8
je 0x404ba4
push 1
push dword [0x4169fe]
push 0x1eb
call fcn.00407f67
cmp byte [0x4161d4], 2
jne 0x40515a
jmp 0x404f9c
test dword [ebp - 0x4a8], 0x10
jne 0x404d13
cmp byte [0x4161d4], 1
je 0x40517f
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fe]
call fcn.00404737
test eax, eax
jne 0x404c1d
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x404bdf
cmp eax, 2
je 0x40515a
jmp 0x4058b0
test dword [ebp - 0x4a8], 1
je 0x404c81
and dword [ebp - 0x4a8], 0xfffffffe
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [ebp - 0x4a8]
lea eax, [ebp - 0x47c]
push eax
call fcn.00413319
test eax, eax
jne 0x404c81
push 0
push dword [0x4169fe]
push 0x20c
push 0x1f9
push 0x1a3
call fcn.004098f6
cmp eax, 1
je 0x404c3c
cmp eax, 2
je 0x40515a
jmp 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
inc dword [0x416992]
push 0
push 0x189
call fcn.0040d931
lea eax, [ebp - 0x47c]
push eax
call fcn.0041336f
test eax, eax
jne 0x404cde
push 0
push dword [0x4169fe]
push 0x211
push 0x1fe
push 0x19c
call fcn.004098f6
cmp eax, 1
je 0x404c9f
cmp eax, 2
je 0x40515a
jmp 0x4058b0
inc dword [0x416976]
test word [0x416928], 8
je 0x404d01
push 1
push dword [0x4169fe]
push 0x1ea
call fcn.00407f67
cmp byte [0x4161d4], 2
je 0x40517f
jmp 0x404fef
mov ecx, dword [0x416a06]
cmp dword [0x416a0e], ecx
jb 0x404d69
add ecx, 4
mov dword [0x416a06], ecx
shl ecx, 2
mov byte [0x4161d1], 0xcb
push 2
push ecx
push dword [0x416a02]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x4058b0
mov dword [0x416a02], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x4058a9
mov dword [0x416a0a], eax
jmp 0x4047b4
cmp byte [0x4161d4], 2
jne 0x404d84
cmp byte [0x416912], 0
je 0x40515a
cmp byte [0x4161d4], 1
jne 0x404d9a
cmp byte [0x416912], 1
je 0x40515a
cmp byte [0x416912], 2
je 0x40515a
cmp byte [0x416912], 1
jne 0x404f90
cmp byte [0x4161d4], 1
je 0x40515a
test dword [ebp - 0x258], 0x10
je 0x404e5d
xor ebx, ebx
test word [0x416928], 0x10
je 0x404dea
test word [0x416928], 0x400
je 0x404dea
inc ebx
push ebx
push 0x41696a
push 0x41695a
push dword [0x4169fa]
call fcn.0040388b
test eax, eax
jne 0x404e37
cmp byte [0x4161d2], 2
jne 0x4058b0
test word [0x416928], 0x10
je 0x4058b0
push 1
push dword [0x4169fa]
push 0x1ed
call fcn.00407f67
jmp 0x4058b0
test word [0x416928], 0x10
je 0x40515a
push 1
push dword [0x4169fa]
push 0x1eb
call fcn.00407f67
jmp 0x40515a
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fa]
call fcn.00404737
test eax, eax
jne 0x404ea7
push 0
push dword [0x4169fa]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x404e69
cmp eax, 2
je 0x40515a
jmp 0x4058b0
test dword [ebp - 0x258], 1
je 0x404f0b
and dword [ebp - 0x258], 0xfffffffe
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [ebp - 0x258]
lea eax, [ebp - 0x22c]
push eax
call fcn.00413319
test eax, eax
jne 0x404f0b
push 0
push dword [0x4169fa]
push 0x210
push 0x1fd
push 0x19d
call fcn.004098f6
cmp eax, 1
je 0x404ec6
cmp eax, 2
je 0x40515a
jmp 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
inc dword [0x416992]
push 0
push 0x189
call fcn.0040d931
lea eax, [ebp - 0x22c]
push eax
call fcn.0041336f
test eax, eax
jne 0x404f68
push 0
push dword [0x4169fa]
push 0x211
push 0x1fe
push 0x19c
call fcn.004098f6
cmp eax, 1
je 0x404f29
cmp eax, 2
je 0x40515a
jmp 0x4058b0
inc dword [0x41695a]
test word [0x416928], 0x10
je 0x404f8b
push 1
push dword [0x4169fa]
push 0x1ea
call fcn.00407f67
jmp 0x40515a
test dword [ebp - 0x258], 0x10
jne 0x404fef
inc dword [0x416992]
push dword [0x4169fa]
call fcn.0040da1e
push eax
push 0x188
call fcn.0040d931
xor ebx, ebx
test word [0x416928], 4
je 0x404fca
mov ebx, 0x1e6
push 0x416972
push ebx
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.0040f856
cmp eax, 3
je 0x4058b0
jmp 0x40515a
inc dword [0x416996]
inc dword [0x41697e]
push 0
push 0x18a
call fcn.0040d931
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fe]
call fcn.004046ec
test eax, eax
jne 0x405051
push 0
push dword [0x4169fe]
push 0x20f
push 0x1fc
push 0x19b
call fcn.004098f6
cmp eax, 1
je 0x405013
cmp eax, 2
je 0x40515a
jmp 0x4058b0
test word [0x416928], 4
je 0x40506e
push 1
push dword [0x4169fe]
push 0x1e9
call fcn.00407f67
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.00411140
cmp eax, 3
je 0x4058b0
cmp byte [0x4161fb], 0
je 0x4050d5
push 0
push 0x1ab
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.0040f9bc
cmp eax, 3
je 0x4058b0
cmp byte [0x4161fc], 0
je 0x4050d5
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.0040fc74
cmp eax, 3
je 0x4058b0
xor ebx, ebx
test word [0x416928], 4
je 0x4050ee
test word [0x416928], 0x400
je 0x4050ee
inc ebx
push 0x41697e
push 0x416972
push ebx
push dword [0x4169fe]
push dword [0x4169fa]
call fcn.00403fd0
test eax, eax
jne 0x405137
test word [0x416928], 4
je 0x40512b
push 1
push dword [0x4169fe]
push 0x1e8
call fcn.00407f67
mov dword [ebp - 4], 3
jmp 0x4058b0
dec eax
je 0x40515a
dec eax
je 0x40512b
test word [0x416928], 4
je 0x40515a
push 1
push dword [0x4169fe]
push 0x1e7
call fcn.00407f67
call fcn.004066c0
test eax, eax
je 0x4058b0
call fcn.0040670a
test eax, eax
je 0x4058b0
push dword [0x4169fa]
call fcn.0041079f
call fcn.004096f6
test eax, eax
je 0x4058b0
push 0
push 0x186
call fcn.0040d931
mov ax, word [0x41692d]
mov word [0x4161d9], ax
mov esi, dword [0x416a0e]
dec esi
shl esi, 2
add esi, dword [0x416a0a]
lea eax, [ebp - 0x258]
push eax
push dword [esi]
call fcn.004133c5
test eax, eax
jne 0x404949
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
je 0x4051fe
push 0
push dword [0x4169fa]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x4051b4
cmp eax, 3
je 0x4058b0
dec dword [0x416a0e]
mov esi, dword [0x416a0e]
shl esi, 2
add esi, dword [0x416a0a]
push dword [esi]
call sub.KERNEL32.dll_FindClose
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fe]
call fcn.00408b96
test eax, eax
jne 0x405264
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x405226
cmp eax, 2
je 0x405862
jmp 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x4a8]
push eax
push 0x416ef0
call fcn.0041339a
cmp eax, 0xffffffff
jne 0x4052c3
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x405862
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x405270
cmp eax, 2
je 0x405862
jmp 0x4058b0
mov dword [ebp - 8], eax
test dword [ebp - 0x4a8], 0x10
je 0x405304
lea eax, [ebp - 0x47c]
push eax
push 0x416ef8
call fcn.00413094
test eax, eax
je 0x4057e7
lea eax, [ebp - 0x47c]
push eax
push 0x416efc
call fcn.00413094
test eax, eax
je 0x4057e7
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fa]
call fcn.00408b96
test eax, eax
jne 0x40534e
push 0
push dword [0x4169fa]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x405310
cmp eax, 2
je 0x405862
jmp 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x47c]
push eax
call fcn.0041339a
cmp eax, 0xffffffff
je 0x40537d
push eax
call sub.KERNEL32.dll_FindClose
jmp 0x4057e7
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x4053b6
push 0
push dword [0x4169fa]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40535a
cmp eax, 2
je 0x405862
jmp 0x4058b0
cmp byte [0x416916], 2
je 0x4057e7
cmp byte [0x4161d4], 1
jne 0x4053db
cmp byte [0x416916], 1
je 0x4057e7
jmp 0x4053f2
cmp byte [0x4161d4], 2
jne 0x4053f2
cmp byte [0x416916], 0
jne 0x4053f2
jmp 0x4057e7
lea eax, [ebp - 0x47c]
push eax
call fcn.0040666b
test eax, eax
je 0x405862
test dword [ebp - 0x4a8], 0x10
jne 0x4055ca
cmp byte [0x416916], 1
jne 0x405556
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fe]
call fcn.00404737
test eax, eax
jne 0x40546d
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40542f
cmp eax, 2
je 0x4057da
jmp 0x4058b0
test dword [ebp - 0x4a8], 1
je 0x4054d1
and dword [ebp - 0x4a8], 0xfffffffe
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [ebp - 0x4a8]
lea eax, [ebp - 0x47c]
push eax
call fcn.00413319
test eax, eax
jne 0x4054d1
push 0
push dword [0x4169fe]
push 0x210
push 0x1fd
push 0x19d
call fcn.004098f6
cmp eax, 1
je 0x40548c
cmp eax, 2
je 0x4057da
jmp 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
inc dword [0x416992]
push 0
push 0x189
call fcn.0040d931
lea eax, [ebp - 0x47c]
push eax
call fcn.0041336f
test eax, eax
jne 0x40552e
push 0
push dword [0x4169fe]
push 0x211
push 0x1fe
push 0x19c
call fcn.004098f6
cmp eax, 1
je 0x4054ef
cmp eax, 2
je 0x4057da
jmp 0x4058b0
inc dword [0x416976]
test word [0x416928], 8
je 0x405551
push 1
push dword [0x4169fe]
push 0x1ea
call fcn.00407f67
jmp 0x4057da
lea eax, [ebp - 0x47c]
push eax
call fcn.00406616
test eax, eax
je 0x4058b0
inc dword [0x416992]
push dword [0x4169fe]
call fcn.0040da1e
push eax
push 0x188
call fcn.0040d931
xor ebx, ebx
test word [0x416928], 0x80
je 0x405598
mov ebx, 0x1e6
push 0x416956
push ebx
push dword [0x4169fa]
push dword [0x4169fe]
call fcn.0040f856
cmp eax, 3
je 0x4058b0
call fcn.004066c0
test eax, eax
je 0x4058b0
jmp 0x4057da
cmp byte [0x416916], 0
jne 0x405757
lea eax, [ebp - 0x47c]
push eax
call fcn.00406616
test eax, eax
je 0x4058b0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [0x4169fa]
call fcn.004046ec
test eax, eax
jne 0x405635
push 0
push dword [0x4169fa]
push 0x20f
push 0x1fc
push 0x19b
call fcn.004098f6
cmp eax, 1
je 0x4055f7
cmp eax, 2
je 0x405862
jmp 0x4058b0
inc dword [0x416996]
inc dword [0x416966]
push 0
push 0x18a
call fcn.0040d931
test word [0x416928], 0x80
je 0x40566a
push 1
push dword [0x4169fa]
push 0x1e9
call fcn.00407f67
cmp byte [0x4161fc], 0
je 0x40568d
push dword [0x4169fa]
push dword [0x4169fe]
call fcn.0040fc74
cmp eax, 3
je 0x4058b0
cmp byte [0x4161fb], 0
je 0x4056d0
push 0
push 0x1ab
push dword [0x4169fa]
push dword [0x4169fe]
call fcn.0040f9bc
cmp eax, 3
je 0x4058b0
xor ebx, ebx
test word [0x416928], 0x80
je 0x4056d0
test word [0x416928], 0x400
je 0x4056d0
inc ebx
push 0x416966
push 0x416956
push ebx
push dword [0x4169fa]
push dword [0x4169fe]
call fcn.00403fd0
test eax, eax
jne 0x40572a
cmp byte [0x4161d2], 2
je 0x4058b0
test word [0x416928], 0x80
je 0x4058b0
push 1
push dword [0x4169fa]
push 0x1e8
call fcn.00407f67
mov dword [ebp - 4], 2
jmp 0x4058b0
test word [0x416928], 0x80
je 0x405747
push 1
push dword [0x4169fa]
push 0x1e7
call fcn.00407f67
push dword [0x4169fa]
call fcn.0041079f
jmp 0x4055b8
xor ebx, ebx
test word [0x416928], 8
je 0x405770
test word [0x416928], 0x400
je 0x405770
inc ebx
push ebx
push 0x416982
push 0x416976
push dword [0x4169fe]
call fcn.0040388b
test eax, eax
jne 0x4057bd
cmp byte [0x4161d2], 2
jne 0x4058b0
test word [0x416928], 8
je 0x4058b0
push 1
push dword [0x4169fe]
push 0x1ed
call fcn.00407f67
jmp 0x4058b0
test word [0x416928], 8
je 0x4057da
push 1
push dword [0x4169fe]
push 0x1eb
call fcn.00407f67
call fcn.0040670a
test eax, eax
je 0x4058b0
call fcn.004096f6
test eax, eax
je 0x4058b0
push 0
push 0x186
call fcn.0040d931
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x4a8]
push eax
push dword [ebp - 8]
call fcn.004133c5
test eax, eax
jne 0x4052c6
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
je 0x405853
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40580c
cmp eax, 3
je 0x4058b0
push dword [ebp - 8]
call sub.KERNEL32.dll_FindClose
mov dword [ebp - 8], 0
cmp dword [0x416a0e], 0
je 0x40588d
call fcn.004066c0
test eax, eax
je 0x4058b0
call fcn.0040670a
test eax, eax
je 0x4058b0
push dword [0x4169fa]
call fcn.0041079f
jmp 0x40517f
cmp byte [0x4161d4], 1
jbe 0x4058a2
mov byte [0x4161d4], 1
jmp 0x4047b4
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret
mov esi, dword [0x416a0e]
mov edi, dword [0x416a0a]
cmp dword [ebp - 8], 0
je 0x4058ca
push dword [ebp - 8]
call sub.KERNEL32.dll_FindClose
test esi, esi
je 0x4058a9
dec esi
push dword [edi + esi*4]
call sub.KERNEL32.dll_FindClose
jmp 0x4058ca