Function at 0x1116f9c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x111e95b8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x11279148]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea edi, [esi + 0x29c]
push edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [esi + 0x218], ebx
je 0x1116fcb1
lea eax, [esi + 0xc]
push eax
push str.End_Record__s_n
call fcn.111bd7b0
mov edi, dword [esi + 0x220]
add esp, 8
cmp edi, ebx
je 0x1116fa5e
mov eax, dword [edi]
mov edx, dword [eax + 0x48]
push 1
push ebx
push ebx
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0x1c]
push ebx
push ebx
push ebx
push ebx
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 8]
push ebx
mov ecx, edi
call edx
mov eax, dword [edi + 0x4c]
push eax
mov ecx, edi
call fcn.111707f0
mov dword [esi + 0x220], ebx
mov ecx, dword [esi + 0x27c]
mov edx, dword [esi + 0x290]
lea eax, [esi + 4]
push eax
push 1
push ecx
call edx
add esp, 0xc
cmp dword [ebp + 8], ebx
je 0x1116fc1e
cmp dword [esi + 0x21c], ebx
jne 0x1116fc1e
push 0x30
lea eax, [ebp - 0x40]
push ebx
push eax
call sub.MSVCR100.dll_memset
mov ecx, dword [esi + 0x2b4]
add ecx, dword [esi + 0x22c]
mov eax, dword [esi + 0x218]
mov edx, dword [esi + 0x240]
add esp, 0xc
push 1
push ebx
push ebx
push eax
mov dword [ebp - 0x40], 0x52494350
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx ecx, word [esi + 0x270]
push ebx
push 0x10
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x288]
push edx
push eax
mov word [ebp - 0x30], cx
call fcn.111b7fb0
movzx eax, word [esi + 0x230]
movzx ecx, word [esi + 0x236]
movzx edx, word [esi + 0x232]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov word [ebp - 0x18], ax
movzx eax, word [esi + 0x23c]
mov word [ebp - 0x1c], cx
movzx ecx, word [esi + 0x238]
mov word [ebp - 0x1a], dx
movzx edx, word [esi + 0x23a]
mov word [ebp - 0x12], ax
mov eax, dword [esi + 0x270]
add esp, 0x10
mov word [ebp - 0x16], cx
mov word [ebp - 0x14], dx
cmp eax, ebx
je 0x1116fbde
push ebx
lea ecx, [ebp - 0x44]
push ecx
mov ecx, dword [esi + 0x218]
lea edx, [eax*8]
mov eax, dword [esi + 0x268]
push edx
push eax
push ecx
call edi
test eax, eax
jne 0x1116fb7d
mov edx, dword [esi + 0x280]
lea eax, [esi + 0xc]
push eax
mov eax, dword [esi + 0x294]
push 3
push edx
call eax
add esp, 0xc
mov ecx, dword [esi + 0x288]
push 0xfde9
push ecx
lea ecx, [ebp - 0x48]
call fcn.111bb8e0
mov eax, dword [ebp - 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1116fb97
sub eax, edx
inc eax
movzx edx, ax
push ebx
lea eax, [ebp - 0x44]
push eax
push 2
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x4c], edx
mov edx, dword [esi + 0x218]
push ecx
push edx
call edi
movzx ecx, word [ebp - 0x4c]
mov edx, dword [ebp - 0x48]
push ebx
lea eax, [ebp - 0x44]
push eax
mov eax, dword [esi + 0x218]
push ecx
push edx
push eax
call edi
mov ecx, dword [ebp - 0x48]
push ecx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [esi + 0x218]
push ebx
push ebx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 0x218]
push ebx
lea eax, [ebp - 0x44]
push eax
push 0x30
lea ecx, [ebp - 0x40]
push ecx
push edx
call edi
test eax, eax
jne 0x1116fc1e
mov ecx, dword [esi + 0x294]
lea eax, [esi + 0xc]
push eax
mov eax, dword [esi + 0x280]
push 3
push eax
call ecx
add esp, 0xc
mov edx, dword [esi + 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1116fc47
mov ecx, dword [esi + 0x294]
lea eax, [esi + 0xc]
push eax
mov eax, dword [esi + 0x280]
push 2
push eax
call ecx
add esp, 0xc
mov eax, dword [esi + 0x268]
mov dword [esi + 0x218], ebx
cmp eax, ebx
je 0x1116fc61
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov edx, dword [esi + 0x27c]
mov eax, dword [esi + 0x290]
lea edi, [esi + 4]
push edi
push ebx
push edx
mov dword [esi + 0x268], ebx
mov dword [esi + 0x270], ebx
mov dword [esi + 0x26c], ebx
call eax
mov eax, dword [edi]
add esp, 0xc
cmp eax, ebx
je 0x1116fc9c
cmp eax, 0xffffffff
je 0x1116fc9c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], ebx
cmp dword [esi + 0x2b8], ebx
jne 0x1116fcae
push 1
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov edi, dword [ebp - 0x50]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.111d9022
mov esp, ebp
pop ebp
ret