Function at 0x40ebd3
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd8c
push esi
push edi
mov dword [ebp - 0x274], 0
mov dword [ebp - 0x264], 0
mov ax, word [0x41692d]
mov word [0x4161d9], ax
push dword [ebp + 8]
call fcn.00412a16
test eax, eax
jne 0x40ec3c
push 0
push dword [ebp + 8]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40ebfe
cmp eax, 3
je 0x40f034
inc dword [ebp - 0x274]
jmp 0x40f034
push dword [ebp + 8]
call fcn.00413140
shl eax, 1
add eax, 0x208
mov dword [ebp - 0xc], eax
mov byte [0x4161d1], 0xcb
push dword [ebp - 0xc]
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x40f034
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40f02c
mov dword [ebp - 8], eax
mov byte [0x4161d1], 0xcb
mov dword [ebp - 0x270], 8
push 0x20
push 2
call sub.KERNEL32.dll_GlobalAlloc
test eax, eax
je 0x40f024
mov dword [ebp - 0x268], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40f019
mov dword [ebp - 0x26c], eax
mov dword [ebp - 0x264], 0
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.004130ea
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x260]
push eax
push 0x416ef0
call fcn.0041339a
cmp eax, 0xffffffff
jne 0x40ed3c
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x40efc3
push 0
push dword [ebp + 8]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40ece6
cmp eax, 2
jne 0x40f0cd
inc dword [ebp - 0x274]
jmp 0x40f0cd
mov dword [ebp - 0x10], eax
call fcn.004096f6
test eax, eax
je 0x40f0c5
test dword [ebp - 0x260], 0x10
je 0x40ee95
lea eax, [ebp - 0x234]
push eax
push 0x416efc
call fcn.00413094
test eax, eax
je 0x40ef57
lea eax, [ebp - 0x234]
push eax
push 0x416ef8
call fcn.00413094
test eax, eax
je 0x40ef57
lea eax, [ebp - 0x234]
push eax
call fcn.00412a16
test eax, eax
je 0x40f0c5
mov eax, dword [ebp - 0x270]
cmp dword [ebp - 0x264], eax
jb 0x40edfe
mov byte [0x4161d1], 0xcb
add dword [ebp - 0x270], 4
mov ebx, dword [ebp - 0x270]
shl ebx, 2
push 2
push ebx
push dword [ebp - 0x268]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x40f0c5
mov dword [ebp - 0x268], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40f0c5
mov dword [ebp - 0x26c], eax
mov ebx, dword [ebp - 0x264]
shl ebx, 2
mov ecx, dword [ebp - 0x10]
add ebx, dword [ebp - 0x26c]
mov dword [ebx], ecx
inc dword [ebp - 0x264]
push dword [ebp - 8]
call fcn.00413140
mov esi, eax
lea eax, [ebp - 0x234]
push eax
call fcn.00413140
add esi, eax
add esi, 2
shl esi, 1
cmp dword [ebp - 0xc], esi
jae 0x40ee74
mov dword [ebp - 0xc], esi
mov byte [0x4161d1], 0xcb
push 2
push dword [ebp - 0xc]
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x40f0c5
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40f0c5
mov dword [ebp - 8], eax
push 0x416eec
push dword [ebp - 8]
call fcn.00413115
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 8]
call fcn.00413115
jmp 0x40ecda
push dword [ebp - 8]
call fcn.00413140
mov esi, eax
lea eax, [ebp - 0x234]
push eax
call fcn.00413140
add esi, eax
add esi, 2
shl esi, 1
cmp dword [ebp - 0xc], esi
jae 0x40eef1
mov dword [ebp - 0xc], esi
mov byte [0x4161d1], 0xcb
push 2
push dword [ebp - 0xc]
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x40f0c5
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40f0c5
mov dword [ebp - 8], eax
push 0x416eec
push dword [ebp - 8]
call fcn.00413115
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 8]
call fcn.00413115
mov esi, dword [ebp + 0xc]
inc dword [0x416992]
inc dword [esi]
push 0
push 0x189
call fcn.0040d931
push 1
push dword [ebp - 8]
push 0x1ea
call fcn.00407f67
push dword [ebp - 8]
call fcn.00413140
mov ecx, eax
pushfd
std
shl eax, 1
mov edi, dword [ebp - 8]
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
call fcn.004096f6
test eax, eax
je 0x40f0c5
mov ax, word [0x41692d]
mov word [0x4161d9], ax
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x10]
call fcn.004133c5
test eax, eax
jne 0x40ed3f
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
je 0x40efbb
push 0
push dword [0x4169fe]
push 0x21a
push 0x207
push 0x1ab
call fcn.004098f6
cmp eax, 1
je 0x40ef70
cmp eax, 3
je 0x40f0c5
push dword [ebp - 0x10]
call sub.KERNEL32.dll_FindClose
mov esi, dword [ebp + 0x10]
inc dword [0x416996]
inc dword [esi]
push 0
push 0x18b
call fcn.0040d931
push 1
push dword [ebp - 8]
push 0x1ec
call fcn.00407f67
push 0x416efc
call fcn.00412a16
test eax, eax
je 0x40f0c5
cmp dword [ebp - 0x264], 0
jne 0x40f040
mov dword [ebp - 0x274], 1
push dword [ebp - 0x268]
call sub.KERNEL32.dll_GlobalUnlock
push dword [ebp - 0x268]
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 - 0x274]
pop edi
pop esi
leave
ret 0xc
dec dword [ebp - 0x264]
mov ebx, dword [ebp - 0x264]
shl ebx, 2
add ebx, dword [ebp - 0x26c]
mov eax, dword [ebx]
mov dword [ebp - 0x10], eax
push dword [ebp - 8]
call fcn.00413140
mov ecx, eax
pushfd
std
shl eax, 1
mov edi, dword [ebp - 8]
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 - 0xc]
sub eax, ecx
sub eax, 0x410
jb 0x40ef57
sub dword [ebp - 0xc], eax
mov byte [0x4161d1], 0xcb
push 2
push dword [ebp - 0xc]
push dword [ebp - 4]
call sub.KERNEL32.dll_GlobalReAlloc
test eax, eax
je 0x40f0c5
mov dword [ebp - 4], eax
mov byte [0x4161d1], 0xcc
push eax
call sub.KERNEL32.dll_GlobalLock
test eax, eax
je 0x40f0c5
mov dword [ebp - 8], eax
jmp 0x40ef57
push dword [ebp - 0x10]
call sub.KERNEL32.dll_FindClose
mov edi, dword [ebp - 0x264]
test edi, edi
je 0x40f00e
mov esi, edi
dec edi
shl edi, 2
add edi, dword [ebp - 0x26c]
push dword [edi]
call sub.KERNEL32.dll_FindClose
sub edi, 4
dec esi
jne 0x40f0e7
jmp 0x40f00e