Function at 0x10006021
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push edi
xor ebx, ebx
push ebx
mov ebp, ecx
call esi
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
je 0x10006042
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
mov eax, dword [ebp]
cmp eax, 0xffffffff
je 0x10006233
cmp dword [ebp + 4], 0xdeadbeef
je 0x1000622a
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call esi
test eax, eax
je 0x10006081
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push 4
lea eax, [ebp + 0x14]
push str.STOR
push eax
call fcn.100084d0
push 8
lea eax, [ebp + 0x14]
push eax
push dword [ebp]
call fcn.100069b8
add esp, 0x18
test al, al
je 0x10006221
push ebx
call esi
test eax, eax
je 0x100060c6
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
cmp dword [ebp + 4], ebx
mov dword [esp + 0x10], 8
mov dword [esp + 0x18], ebx
jbe 0x1000613a
mov dword [esp + 0x14], ebx
add dword [esp + 0x10], 0x14
push ebx
call esi
test eax, eax
je 0x100060fc
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 0x10]
push 4
lea eax, [eax + ecx + 4]
pop ecx
mov edx, dword [eax]
add dword [esp + 0x10], edx
add eax, 8
dec ecx
jne 0x1000611c
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
add dword [esp + 0x14], 0x24
cmp eax, dword [ebp + 4]
jb 0x100060ed
push ebx
call esi
test eax, eax
je 0x10006144
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
push ebx
push dword [esp + 0x18]
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 4]
cmp eax, dword [ebp + 0x18]
mov dword [esp + 0x1c], eax
jae 0x10006221
lea eax, [eax + eax*8]
shl eax, 2
mov dword [esp + 0x10], eax
jmp 0x10006185
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0x10]
push 4
add ecx, eax
push ecx
push dword [ebp]
call fcn.100069b8
add esp, 0xc
test al, al
je 0x10006221
push ebx
call esi
test eax, eax
je 0x100061aa
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
push ebx
call esi
test eax, eax
je 0x100061d2
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x18]
lea eax, [eax + ecx + 4]
push eax
mov ecx, ebp
call fcn.100057c4
test al, al
je 0x10006221
inc dword [esp + 0x14]
add dword [esp + 0x18], 8
cmp dword [esp + 0x14], 4
jl 0x100061c8
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x10], 0x24
cmp eax, dword [ebp + 0x18]
jb 0x10006181
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
test eax, eax
je 0x1000623d
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
cmp dword [ebp + 0x18], ebx
mov dword [esp + 0x14], ebx
jbe 0x100062a8
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], 4
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x1c]
add eax, ecx
cmp dword [eax + 4], ebx
je 0x1000628b
push dword [eax + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
add dword [esp + 0x1c], 8
dec dword [esp + 0x10]
jne 0x1000626c
inc dword [esp + 0x14]
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], 0x24
cmp eax, dword [ebp + 0x18]
jb 0x1000625c
push ebx
call esi
test eax, eax
je 0x100062b2
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push dword [ebp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call esi
test eax, eax
je 0x100062df
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call esi
test eax, eax
je 0x1000630c
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
cmp dword [ebp + 0x1c], ebx
je 0x10006362
push 1
push 1
push 1
push dword [ebp + 0x20]
call fcn.1000791a
add esp, 0x10
push ebx
call esi
test eax, eax
je 0x1000633e
push ebx
call edi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push ebx
call edi
push ebx
call esi
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret