Function at 0x40388b
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd8c
push esi
push edi
xor eax, eax
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x26c], eax
push dword [ebp + 8]
call fcn.00413140
add eax, 0x104
shl eax, 1
mov dword [ebp - 0x268], eax
mov byte [0x4161d1], 0xcb
push dword [ebp - 0x268]
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x403f8c
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x403f59
mov dword [ebp - 0x260], eax
mov dword [ebp - 0x270], 8
mov byte [0x4161d1], 0xcb
push 0x20
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x403f51
mov dword [ebp - 8], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x403f84
mov dword [ebp - 0x264], eax
push dword [ebp + 8]
push dword [ebp - 0x260]
call fcn.004130ea
mov dword [ebp - 0x25c], 1
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [ebp + 8]
call fcn.00412a16
test eax, eax
jne 0x403992
push 0
push dword [ebp - 0x260]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x403957
cmp eax, 2
je 0x403d92
jmp 0x403f61
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x258]
push eax
push 0x416ef0
call fcn.0041339a
cmp eax, 0xffffffff
jne 0x4039f1
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x403d92
push 0
push dword [ebp - 0x260]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40399e
cmp eax, 2
je 0x403d92
jmp 0x403f61
mov esi, dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x264]
mov dword [ebx + esi*4], eax
inc dword [ebp - 0x26c]
mov edi, dword [ebp - 0x270]
cmp edi, dword [ebp - 0x26c]
ja 0x403a5c
add dword [ebp - 0x270], 4
mov edi, dword [ebp - 0x270]
mov byte [0x4161d1], 0xcb
shl edi, 2
push 2
push edi
push dword [ebp - 8]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x403f61
mov dword [ebp - 8], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x403f61
mov dword [ebp - 0x264], eax
call fcn.004096f6
test eax, eax
je 0x403f61
test dword [ebp - 0x258], 0x10
jne 0x403c09
push dword [ebp - 0x260]
call fcn.00413140
mov esi, eax
lea eax, [ebp - 0x22c]
push eax
call fcn.00413140
add esi, eax
inc esi
inc esi
shl esi, 1
cmp dword [ebp - 0x268], esi
jae 0x403ae3
mov dword [ebp - 0x268], esi
mov byte [0x4161d1], 0xcb
push 2
push dword [ebp - 0x268]
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x403f61
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x403f59
mov dword [ebp - 0x260], eax
push 0x416eec
push dword [ebp - 0x260]
call fcn.00413115
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x260]
call fcn.00413115
test dword [ebp - 0x258], 1
je 0x403b64
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 0x403b64
push 0
push dword [ebp - 0x260]
push 0x210
push 0x1fd
push 0x19d
call fcn.004098f6
cmp eax, 1
je 0x403b24
cmp eax, 3
je 0x403f61
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 0x403bbd
push 0
push dword [ebp - 0x260]
push 0x211
push 0x1fe
push 0x19c
call fcn.004098f6
cmp eax, 1
je 0x403b82
cmp eax, 2
je 0x403bda
jmp 0x403f61
mov ebx, dword [ebp + 0xc]
inc dword [ebx]
cmp dword [ebp + 0x14], 0
je 0x403bda
push 1
push dword [ebp - 0x260]
push 0x1ea
call fcn.00407f67
push dword [ebp - 0x260]
call fcn.00413140
pushfd
std
mov ecx, eax
mov edi, dword [ebp - 0x260]
shl eax, 1
add edi, eax
dec edi
dec edi
mov ax, 0x5c
repne scasw ax, word es:[edi]
popfd
inc edi
inc edi
mov word [edi], 0
jmp 0x403d14
lea eax, [ebp - 0x22c]
push eax
push 0x416efc
call fcn.00413094
test eax, eax
je 0x403d14
lea eax, [ebp - 0x22c]
push eax
push 0x416ef8
call fcn.00413094
test eax, eax
je 0x403d14
push dword [ebp - 0x260]
call fcn.00413140
mov esi, eax
lea eax, [ebp - 0x22c]
push eax
call fcn.00413140
add esi, eax
inc esi
inc esi
shl esi, 1
cmp dword [ebp - 0x268], esi
jae 0x403ca5
mov dword [ebp - 0x268], esi
mov byte [0x4161d1], 0xcb
push 2
push dword [ebp - 0x268]
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x403f61
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x403f59
mov dword [ebp - 0x260], eax
push 0x416eec
push dword [ebp - 0x260]
call fcn.00413115
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x260]
call fcn.00413115
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x22c]
push eax
call fcn.00412a16
test eax, eax
jne 0x403d09
push 0
push dword [ebp - 0x260]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x403cd3
jmp 0x403f61
inc dword [ebp - 0x25c]
jmp 0x403992
mov ax, word [0x41692d]
mov word [0x4161d9], ax
mov esi, dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x264]
dec esi
lea eax, [ebp - 0x258]
push eax
push dword [ebx + esi*4]
call fcn.004133c5
test eax, eax
jne 0x403a5c
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
je 0x403d78
push 0
push dword [ebp - 0x260]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x403d20
cmp eax, 3
je 0x403f61
dec dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x264]
mov esi, dword [ebp - 0x26c]
push dword [ebx + esi*4]
call sub.KERNEL32.dll_FindClose
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push 0x416efc
call fcn.00412a16
test eax, eax
jne 0x403dd2
push 0
push dword [ebp - 0x260]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x403d9e
jmp 0x403f61
push dword [ebp - 0x260]
call fcn.00413344
test eax, 1
je 0x403e2f
and eax, 0xfffffffe
mov bx, word [0x41692d]
mov word [0x4161d9], bx
push eax
push dword [ebp - 0x260]
call fcn.00413319
test eax, eax
jne 0x403e2f
push 0
push dword [ebp - 0x260]
push 0x210
push 0x1fd
push 0x19e
call fcn.004098f6
cmp eax, 1
je 0x403df5
cmp eax, 3
je 0x403f61
mov ax, word [0x41692d]
mov word [0x4161d9], ax
inc dword [0x416996]
push 0
push 0x18b
call fcn.0040d931
push dword [ebp - 0x260]
call fcn.00413140
pushfd
std
mov ecx, eax
mov edi, dword [ebp - 0x260]
shl eax, 1
add edi, eax
dec edi
dec edi
mov ax, 0x5c
repne scasw ax, word es:[edi]
popfd
add edi, 4
push edi
call fcn.004132c3
test eax, eax
jne 0x403ea8
push 0
push dword [ebp - 0x260]
push 0x216
push 0x203
push 0x1a2
call fcn.004098f6
cmp eax, 1
je 0x403e73
cmp eax, 2
je 0x403ec5
jmp 0x403f61
mov ebx, dword [ebp + 0x10]
inc dword [ebx]
cmp dword [ebp + 0x14], 0
je 0x403ec5
push 1
push dword [ebp - 0x260]
push 0x1ec
call fcn.00407f67
push dword [ebp - 0x260]
call fcn.00413140
pushfd
std
mov ecx, eax
mov edi, dword [ebp - 0x260]
shl eax, 1
add edi, eax
dec edi
dec edi
mov ax, 0x5c
repne scasw ax, word es:[edi]
popfd
inc edi
inc edi
mov word [edi], 0
mov eax, dword [ebp - 0x268]
shl ecx, 1
sub eax, ecx
sub eax, 0x410
jb 0x403f3b
sub dword [ebp - 0x268], eax
mov byte [0x4161d1], 0xcb
push 2
push dword [ebp - 0x268]
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x403f61
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x403f59
mov dword [ebp - 0x260], eax
dec dword [ebp - 0x25c]
jne 0x403d14
mov dword [ebp - 0x274], 1
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalUnlock
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalFree
mov esi, dword [ebp - 0x26c]
mov edi, dword [ebp - 0x264]
test esi, esi
je 0x403f7c
dec esi
push dword [edi + esi*4]
call sub.KERNEL32.dll_FindClose
jmp 0x403f6d
push dword [ebp - 8]
call sub.KERNEL32.dll_GlobalUnlock
push dword [ebp - 8]
call sub.KERNEL32.dll_GlobalFree
mov eax, dword [ebp - 0x274]
pop edi
pop esi
leave
ret 0x10