Function at 0x100055f6
Capabilities:
Write file on windows

Disassembly:
push 0x14
mov eax, 0x1001a454
call fcn.1000e0f8
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ecx, dword [eax]
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
jne 0x10005653
cmp ecx, ebx
je 0x1000580c
mov edi, dword [ebp + 0x1c]
cmp dword [ebp + 0xc], ebx
je 0x100056a5
mov edx, dword [ebp + 0x18]
mov eax, dword [edi]
mov edx, dword [edx]
sub edx, eax
cmp edx, dword [ebp + 0x10]
jb 0x100056a5
push dword [ebp + 0x10]
add eax, ecx
push dword [ebp + 0xc]
push eax
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp + 0x10]
add dword [edi], eax
add esp, 0xc
and dword [ebp - 0x1c], ebx
mov edi, eax
jmp 0x100057c4
cmp ecx, ebx
je 0x10005619
mov eax, dword [esi + 0x30]
mov edx, dword [eax + 8]
mov edi, dword [ebp + 0x18]
lea eax, [edx + 1]
neg eax
sbb eax, eax
and eax, edx
cmp eax, dword [edi]
jae 0x10005619
push dword [ebp + 0x1c]
push edi
push dword [ebp + 0x14]
push ebx
push ebx
push esi
call fcn.100055f6
add esp, 0x18
test eax, eax
jne 0x1000568a
xor eax, eax
jmp 0x1000580f
push dword [ebp + 0x1c]
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.100055f6
add esp, 0x18
jmp 0x1000580f
mov eax, dword [esi + 0x30]
lea ecx, [eax + 0x150]
test ecx, ecx
je 0x100056bd
lea ebx, [eax + 0x154]
mov dword [ebp - 0x1c], ebx
jmp 0x100056c3
and dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x100056d1
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x30]
and dword [ebp - 4], 0
push 0
push dword [esi + 0x4c]
push dword [esi + 0x48]
push dword [eax + 0x16c]
call fcn.100096b6
add esp, 0x10
test al, al
jne 0x100056ff
test ebx, ebx
je 0x10005683
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10005683
mov eax, dword [edi]
and dword [ebp - 0x18], 0
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], 1
test eax, eax
je 0x1000573f
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
mov eax, dword [esi + 0x30]
push dword [eax + 0x16c]
call ebx
test eax, eax
je 0x10005771
mov eax, dword [edi]
cmp eax, dword [ebp - 0x18]
jne 0x10005771
mov dword [ebp - 0x10], 1
cmp dword [ebp + 0x10], 0
je 0x10005775
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x10]
mov eax, dword [esi + 0x30]
push dword [ebp + 0xc]
push dword [eax + 0x16c]
call ebx
test eax, eax
je 0x10005771
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x10005771
mov dword [ebp - 0x10], 1
jmp 0x10005775
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x1c], 0
je 0x10005788
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
jne 0x100057a0
cmp dword [ebp - 0x14], 0
je 0x10005683
push dword [ebp - 0x14]
jmp 0x100056f7
mov eax, dword [edi]
mov ecx, dword [ebp + 0x10]
lea ebx, [eax + ecx]
xor ecx, ecx
neg eax
adc ecx, ecx
neg ecx
cmp dword [ebp - 0x14], 0
mov edi, eax
mov dword [ebp - 0x1c], ecx
je 0x100057c4
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x30]
lea ecx, [eax + 0x1c]
test ecx, ecx
je 0x100057d3
add eax, 0x20
jmp 0x100057d5
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x30]
add dword [eax + 0xc], edi
test ebx, ebx
je 0x100057f4
xor eax, eax
add dword [esi + 0x10], ebx
adc dword [esi + 0x14], eax
add dword [esi + 0x48], ebx
adc dword [esi + 0x4c], eax
mov esi, dword [esi + 0x30]
lea eax, [esi + 0x1c]
test eax, eax
je 0x10005803
lea eax, [esi + 0x20]
jmp 0x10005805
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
inc eax
call fcn.1000e197
ret