Function at 0x1000be40
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2654
call fcn.10023930
mov eax, dword [0x10035400]
xor eax, esp
mov dword [esp + 0x2650], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.GlobalLCMS_Single_EventRead
push esi
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventA]
push 0x1f0003
mov ebx, eax
call esi
push str.GlobalLCMS_Single_EventWrite
push 0
mov edi, eax
push 0x1f0003
mov dword [esp + 0x2c], edi
call esi
test edi, edi
mov esi, eax
mov dword [esp + 0x14], esi
je 0x1000befa
test esi, esi
je 0x1000befa
push str.GlobalLCMS_Single_ShareMemory
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
test eax, eax
mov dword [esp + 0x10], eax
je 0x1000befa
push 0x87804
push 0
push 0
push 0xf001f
mov edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x1000befa
mov dword [esp + 0x24], 1
jmp 0x1000bf07
cmp dword [0x1006bf90], 0
je 0x1000c390
push 0x10ec
lea eax, [esp + 0x68]
push 0
push eax
mov dword [esp + 0x6c], 0
call fcn.1001f410
push 0xfff
lea ecx, [esp + 0x1669]
push 0
push ecx
mov byte [esp + 0x1670], 0
call fcn.1001f410
mov eax, dword [ebp + 0x14]
lea edx, [ebp + 0x18]
push edx
push eax
lea ecx, [esp + 0x1678]
push 0x1000
push ecx
call fcn.100183f5
mov edi, eax
add esp, 0x28
cmp edi, 0x1000
mov byte [esp + 0x2657], 0
jne 0x1000bf70
lea edi, [eax - 1]
jmp 0x1000bf7a
cmp edi, 0xffffffff
jne 0x1000bf7a
mov edi, 0x1000
cmp dword [ebp + 8], 1
jne 0x1000c023
test ebx, ebx
je 0x1000c023
mov edx, dword [str._Error]
mov eax, dword [0x1002ec58]
push 0x3f8
lea ecx, [esp + 0x1264]
push 0
push ecx
mov dword [esp + 0x1264], edx
mov dword [esp + 0x1268], eax
call fcn.1001f410
add esp, 0xc
push 0
push 0x3f9
lea edx, [esp + 0x1267]
push edx
push 0x400
push ebx
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea eax, [esp + 0x1258]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1000bfe8
sub eax, edx
mov esi, 0xfff
mov ebx, eax
sub esi, edi
cmp ebx, esi
jl 0x1000c002
mov eax, esi
push eax
lea eax, [esp + 0x125c]
push eax
lea ecx, [esp + edi + 0x1660]
push ecx
call fcn.10018410
add esp, 0xc
cmp ebx, esi
jge 0x1000c021
mov esi, ebx
add edi, esi
mov edx, dword [ebp + 8]
add edi, 0xf1
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 0xc4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0xc8], eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [esp + 0x42]
movzx edx, word [esp + 0x3e]
movzx eax, word [esp + 0x3c]
push ecx
push edx
push eax
lea ecx, [esp + 0x74]
push str._04d__02d__02d
push ecx
call fcn.100182ad
movzx edx, word [esp + 0x5e]
movzx eax, word [esp + 0x5c]
movzx ecx, word [esp + 0x5a]
push edx
movzx edx, word [esp + 0x5c]
push eax
push ecx
push edx
lea eax, [esp + 0x98]
push str._02d:_02d:_02d._03d
push eax
call fcn.100182ad
push 0x103
lea ecx, [esp + 0x1181]
push 0
push ecx
mov byte [esp + 0x1188], 0
call fcn.1001f410
mov eax, dword [0x1006bf8c]
add esp, 0x38
push 0x104
lea edx, [esp + 0x1154]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [eax - 1]
test ecx, ecx
mov bl, 0x5c
jl 0x1000c11c
cmp byte [esp + ecx + 0x1150], bl
je 0x1000c0f3
sub ecx, 1
jns 0x1000c0e5
test ecx, ecx
jle 0x1000c11c
sub eax, ecx
cmp eax, 0x3f
jle 0x1000c103
mov eax, 0x3f
push eax
lea ecx, [esp + ecx + 0x1155]
push ecx
lea edx, [esp + 0x8c]
push edx
call fcn.10018410
add esp, 0xc
mov edx, dword [esp + 0x18]
cmp byte [edx], 0x2e
jne 0x1000c12d
cmp byte [edx + 1], bl
jne 0x1000c12d
add edx, 2
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1000c132
sub eax, edi
cmp eax, 0x3f
jle 0x1000c147
mov eax, 0x3f
push eax
push edx
lea eax, [esp + 0xd4]
push eax
call fcn.10018410
mov edi, dword [esp + 0x18]
mov eax, edi
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1000c162
sub eax, edx
cmp eax, 0x3f
jle 0x1000c177
mov eax, 0x3f
push eax
lea ecx, [esp + 0x110]
push edi
push ecx
call fcn.10018410
mov edx, dword [ebp + 0x10]
push 0xfff
lea eax, [esp + 0x1668]
push eax
lea ecx, [esp + 0x164]
push ecx
mov dword [esp + 0x164], edx
call fcn.10018410
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 0x18
cmp dword [esp + 0x24], 0
je 0x1000c210
mov edi, dword [esp + 0x14]
push 0x3e8
push edi
call esi
test eax, eax
jne 0x1000c200
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
cmp eax, 0x80
jne 0x1000c1dc
lea edx, [ecx + 4]
jmp 0x1000c1ed
mov edx, eax
imul edx, edx, 0x10f0
add eax, 1
lea edx, [edx + ecx + 4]
mov dword [ecx], eax
push 0x10f0
lea eax, [esp + 0x64]
push eax
push edx
call fcn.10022400
add esp, 0xc
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetEvent]
call edi
mov ecx, dword [esp + 0x20]
push ecx
call edi
cmp dword [0x1006bf90], 0
je 0x1000c388
cmp dword [0x1003617c], 0xffffffff
je 0x1000c388
mov edx, dword [0x1006bf94]
push 0x1f4
push edx
call esi
test eax, eax
jne 0x1000c388
mov eax, dword [0x1003617c]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileSize]
xor edi, edi
push edi
push eax
call ebx
cmp eax, dword [0x1006bf98]
jae 0x1000c36b
push edi
push edi
xor eax, eax
push edi
push edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [esp + 0x60]
lea ecx, [esp + 0x28]
push ecx
push edi
push edx
push edi
mov dword [esp + 0x48], eax
mov eax, dword [0x1003617c]
push 2
push eax
call dword [sym.imp.KERNEL32.dll_LockFileEx]
cmp eax, edi
jne 0x1000c2d4
mov ecx, dword [esp + 0x38]
push 0x1f4
push ecx
call esi
test eax, eax
jne 0x1000c34f
mov ecx, dword [0x1003617c]
push 1
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp eax, edi
je 0x1000c340
xor eax, eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [0x1003617c]
push edi
push eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x54], edi
call ebx
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x1c]
push edx
mov edx, dword [0x1003617c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x68]
push eax
lea ecx, [esp + 0x6c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x1003617c]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov edx, dword [esp + 0x60]
mov eax, dword [0x1003617c]
lea ecx, [esp + 0x28]
push ecx
push edi
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov ecx, dword [esp + 0x38]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebx
jmp 0x1000c371
mov edx, dword [0x1003617c]
push edx
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov ecx, dword [esp + 0x38]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call ebx
jmp 0x1000c371
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x1006bf94]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
jmp 0x1000c396
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1000c3a5
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1000c3b0
push eax
call ebx
test edi, edi
je 0x1000c3b7
push edi
call ebx
test esi, esi
je 0x1000c3be
push esi
call ebx
mov ecx, dword [esp + 0x265c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1001829e
mov esp, ebp
pop ebp
ret