Function at 0x403fd0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd78
push esi
push edi
mov dword [ebp - 0x288], 0
push dword [ebp + 8]
call fcn.00413140
inc eax
shl eax, 1
mov dword [ebp - 0xc], eax
add eax, 0x208
mov dword [ebp - 0x10], eax
push dword [ebp + 0xc]
call fcn.00413140
inc eax
shl eax, 1
mov dword [ebp - 0x1c], eax
add eax, 0x208
mov dword [ebp - 0x20], eax
mov byte [0x4161d1], 0xcb
push dword [ebp - 0x10]
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x404674
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x404664
mov dword [ebp - 8], eax
mov byte [0x4161d1], 0xcb
push dword [ebp - 0x20]
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x40466c
mov dword [ebp - 0x14], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40465c
mov dword [ebp - 0x18], eax
mov byte [0x4161d1], 0xcb
push 0x20
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x404654
mov dword [ebp - 0x28], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40464c
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], 8
mov dword [ebp - 0x30], 0
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.004130ea
push dword [ebp + 0xc]
push dword [ebp - 0x18]
call fcn.004130ea
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [ebp - 8]
call fcn.00412a16
test eax, eax
jne 0x404124
push 0
push dword [ebp - 8]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x4040dc
cmp eax, 3
je 0x4046d3
cmp dword [ebp - 0x30], 0
jne 0x404680
inc dword [ebp - 0x288]
jmp 0x404644
push dword [ebp - 8]
call fcn.0041079f
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x284]
push eax
push 0x416ef0
call fcn.0041339a
cmp eax, 0xffffffff
jne 0x404198
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x40462f
push 0
push dword [ebp - 8]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x404138
cmp eax, 3
je 0x4046d3
cmp dword [ebp - 0x30], 0
jne 0x404680
inc dword [ebp - 0x288]
jmp 0x404644
mov esi, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x2c]
mov dword [ebx + esi*4], eax
inc dword [ebp - 0x30]
call fcn.004096f6
test eax, eax
je 0x4046d3
lea eax, [ebp - 0x258]
push eax
call fcn.00413140
inc eax
shl eax, 1
mov dword [ebp - 0x24], eax
test dword [ebp - 0x284], 0x10
je 0x404456
lea eax, [ebp - 0x258]
push eax
push 0x416ef8
call fcn.00413094
test eax, eax
je 0x4045c1
lea eax, [ebp - 0x258]
push eax
push 0x416efc
call fcn.00413094
test eax, eax
je 0x4045c1
inc dword [0x416996]
push 0
push 0
call fcn.0040d931
mov ebx, dword [ebp - 0xc]
add ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 0x10], ebx
jae 0x40425a
mov dword [ebp - 0x10], ebx
mov byte [0x4161d1], 0xcb
push 2
push ebx
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x4046d3
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x4046d3
mov dword [ebp - 8], eax
push 0x416eec
push dword [ebp - 8]
call fcn.00413115
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 8]
call fcn.00413115
push dword [ebp - 8]
call fcn.0040ea63
test eax, eax
je 0x4042b6
inc dword [0x416996]
push 0
push 0
call fcn.0040d931
inc dword [0x41696e]
test word [0x416928], 0x200
je 0x4042b1
push 1
push dword [ebp - 8]
push 0x1f7
call fcn.00407f67
jmp 0x4045ae
mov ebx, dword [ebp - 0x1c]
add ebx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], ebx
cmp dword [ebp - 0x20], ebx
jae 0x4042fc
mov dword [ebp - 0x20], ebx
mov byte [0x4161d1], 0xcb
push 2
push ebx
push dword [ebp - 0x14]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x4046d3
mov dword [ebp - 0x14], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x4046d3
mov dword [ebp - 0x18], eax
push 0x416eec
push dword [ebp - 0x18]
call fcn.00413115
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x18]
call fcn.00413115
push 0
push 0x18a
call fcn.0040d931
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push 0
push dword [ebp - 0x18]
call fcn.00412baa
test eax, eax
jne 0x404374
push 0
push dword [ebp - 0x18]
push 0x20f
push 0x1fc
push 0x19b
call fcn.004098f6
cmp eax, 1
je 0x404330
cmp eax, 2
je 0x40459b
mov dword [ebp - 0x288], 2
jmp 0x4046d3
cmp dword [ebp + 0x10], 0
je 0x40438e
mov esi, dword [ebp + 0x18]
inc dword [esi]
push 1
push dword [ebp - 0x18]
push 0x1e9
call fcn.00407f67
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.00411140
cmp eax, 3
je 0x4046d3
cmp byte [0x4161fb], 0
je 0x4043d1
push 0
push 0x1ae
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.0040f9bc
cmp eax, 3
jne 0x4043d1
mov dword [ebp - 0x288], 2
jmp 0x4046d3
cmp byte [0x4161fc], 0
je 0x404406
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.0040fc74
test eax, eax
je 0x4046d3
cmp eax, 4
je 0x404406
cmp eax, 2
je 0x404406
mov dword [ebp - 0x288], 2
jmp 0x4046d3
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x30], eax
jb 0x4040d0
add dword [ebp - 0x34], 4
mov eax, dword [ebp - 0x34]
shl eax, 2
mov byte [0x4161d1], 0xcb
push 2
push eax
push dword [ebp - 0x28]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x404644
mov dword [ebp - 0x28], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x404644
mov dword [ebp - 0x2c], eax
jmp 0x4040d0
mov ebx, dword [ebp - 0xc]
add ebx, dword [ebp - 0x24]
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 0x10], ebx
jae 0x40449c
mov dword [ebp - 0x10], ebx
mov byte [0x4161d1], 0xcb
push 2
push ebx
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x4046d3
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x4046d3
mov dword [ebp - 8], eax
push 0x416eec
push dword [ebp - 8]
call fcn.00413115
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 8]
call fcn.00413115
push dword [ebp - 8]
call fcn.0040e7fb
test eax, eax
je 0x4044fc
inc dword [0x416992]
push 0
push 0
call fcn.0040d931
inc dword [0x416962]
test word [0x416928], 0x200
je 0x4045ae
push 1
push dword [ebp - 8]
push 0x1f6
call fcn.00407f67
jmp 0x4045ae
mov ebx, dword [ebp - 0x1c]
add ebx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], ebx
cmp dword [ebp - 0x20], ebx
jae 0x404542
mov dword [ebp - 0x20], ebx
mov byte [0x4161d1], 0xcb
push 2
push ebx
push dword [ebp - 0x14]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x4046d3
mov dword [ebp - 0x14], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x4046d3
mov dword [ebp - 0x18], eax
push 0x416eec
push dword [ebp - 0x18]
call fcn.00413115
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x18]
call fcn.00413115
inc dword [0x416992]
push dword [ebp - 8]
call fcn.0040da1e
push eax
push 0x188
call fcn.0040d931
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x404583
mov ebx, 0x1e6
push dword [ebp + 0x14]
push ebx
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.0040f856
cmp eax, 3
je 0x4046d3
mov eax, dword [ebp - 0x24]
sub dword [ebp - 0x1c], eax
mov esi, dword [ebp - 0x18]
add esi, dword [ebp - 0x1c]
dec esi
dec esi
mov word [esi], 0
mov eax, dword [ebp - 0x24]
sub dword [ebp - 0xc], eax
mov esi, dword [ebp - 8]
add esi, dword [ebp - 0xc]
dec esi
dec esi
mov word [esi], 0
mov esi, dword [ebp - 0x30]
dec esi
mov ebx, dword [ebp - 0x2c]
mov edi, dword [ebx + esi*4]
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x284]
push eax
push edi
call fcn.004133c5
test eax, eax
jne 0x4041a4
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
je 0x404629
push 0
push dword [ebp - 8]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x4045d7
cmp eax, 3
je 0x4046d3
cmp dword [ebp - 0x30], 1
jne 0x404629
inc dword [ebp - 0x288]
push edi
call sub.KERNEL32.dll_FindClose
cmp dword [ebp - 0x30], 0
je 0x40463a
dec dword [ebp - 0x30]
jne 0x404680
mov dword [ebp - 0x288], 3
push dword [ebp - 0x28]
call sub.KERNEL32.dll_GlobalUnlock
push dword [ebp - 0x28]
call sub.KERNEL32.dll_GlobalFree
push dword [ebp - 0x14]
call sub.KERNEL32.dll_GlobalUnlock
push dword [ebp - 0x14]
call sub.KERNEL32.dll_GlobalFree
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalUnlock
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalFree
mov eax, dword [ebp - 0x288]
pop edi
pop esi
leave
ret 0x14
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov ax, 0x5c
add edi, ecx
dec edi
dec edi
pushfd
shr ecx, 1
std
repne scasw ax, word es:[edi]
popfd
inc edi
inc ecx
inc edi
shl ecx, 1
mov word [edi], 0
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov ax, 0x5c
add edi, ecx
dec edi
dec edi
pushfd
shr ecx, 1
std
repne scasw ax, word es:[edi]
popfd
inc edi
inc ecx
inc edi
shl ecx, 1
mov word [edi], 0
mov dword [ebp - 0x1c], ecx
push dword [ebp - 8]
call fcn.0041079f
jmp 0x4045c1
mov esi, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
test esi, esi
je 0x404644
dec esi
push dword [edi + esi*4]
call sub.KERNEL32.dll_FindClose
jmp 0x4046d9