Function at 0x1000827f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x360], ebx
je 0x100084e5
push dword [ebp + 0xc]
push esi
call fcn.1000fc05
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
push dword [ebp + 0xc]
push esi
call fcn.1000fc6c
lea eax, [esi + 0x2f0]
push eax
push esi
call fcn.1000fdc6
add esp, 0x24
test eax, eax
jle 0x100084e5
push edi
cmp dword [esi + 0x340], ebx
jne 0x1000830e
lea eax, [esi + 0x2f0]
push eax
call fcn.1000f695
lea edi, [esi + 0x35c]
push eax
mov dword [edi], eax
lea eax, [esi + 0x20]
push eax
call fcn.1000f6d7
push dword [edi]
lea eax, [esi + 0x188]
push eax
call fcn.1000f6d7
add esp, 0x14
mov dword [esi + 0x340], 1
jmp 0x1000836d
lea edi, [esi + 0x2f0]
push edi
call fcn.1000f695
cmp dword [esi + 0x35c], eax
pop ecx
je 0x10008379
cmp dword [esi + 0x340], ebx
je 0x10008342
lea eax, [esi + 0x20]
push eax
call fcn.1000f735
lea eax, [esi + 0x188]
push eax
call fcn.1000f735
pop ecx
pop ecx
push edi
call fcn.1000f695
mov dword [esi + 0x35c], eax
push eax
lea eax, [esi + 0x20]
push eax
call fcn.1000f6d7
push dword [esi + 0x35c]
lea eax, [esi + 0x188]
push eax
call fcn.1000f6d7
add esp, 0x14
mov dword [esi + 0x358], ebx
mov dword [esi + 0x344], ebx
lea eax, [esi + 0x2f0]
lea edi, [esi + 0x20]
push eax
push edi
call fcn.1000fdfa
lea eax, [esi + 0x310]
push eax
push edi
call fcn.100100de
add esp, 0x10
test eax, eax
jle 0x1000846e
cmp dword [esi + 0x348], ebx
je 0x100083f9
cmp dword [esi + 0x344], ebx
jne 0x10008401
mov eax, dword [esi + 0x358]
cmp eax, 2
jle 0x100083f9
mov ecx, dword [esi + 0x324]
mov edi, dword [esi + 0x320]
cmp ecx, ebx
jl 0x100083f9
jg 0x100083d2
cmp edi, ebx
jb 0x100083f9
add eax, 0xfffffffe
mov dword [esi + 0x344], 1
shl eax, 0xc
cdq
cmp ecx, edx
jl 0x100083f9
jg 0x100083ed
cmp edi, eax
jbe 0x100083f9
mov dword [esi + 0x350], edi
mov dword [esi + 0x354], ecx
cmp dword [esi + 0x344], ebx
je 0x1000844b
mov eax, dword [esi + 0x324]
mov edx, dword [esi + 0x354]
mov ecx, dword [esi + 0x320]
mov edi, dword [esi + 0x350]
cmp eax, edx
jl 0x10008435
jg 0x10008423
cmp ecx, edi
jb 0x10008435
sub ecx, edi
sbb eax, edx
mov dword [esi + 0x320], ecx
mov dword [esi + 0x324], eax
jmp 0x1000844b
cmp eax, ebx
jl 0x1000844b
jg 0x1000843f
cmp ecx, ebx
jbe 0x1000844b
mov dword [esi + 0x320], ebx
mov dword [esi + 0x324], ebx
lea edi, [esi + 0x310]
lea eax, [esi + 0x188]
push edi
push eax
call fcn.1000f812
inc dword [esi + 0x358]
lea eax, [esi + 0x20]
push edi
push eax
jmp 0x10008391
cmp dword [esi + 0x358], 3
lea edi, [esi + 0x300]
lea eax, [esi + 0x188]
push edi
push eax
jne 0x1000848c
call fcn.1000f9a5
jmp 0x10008491
call fcn.1000fb81
pop ecx
cmp eax, ebx
pop ecx
jle 0x100084cd
lea eax, [ebp + 0xc]
push ebx
push eax
push dword [esi + 0x304]
push dword [edi]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esi + 0x360]
call edi
lea eax, [ebp + 0xc]
push ebx
push eax
push dword [esi + 0x30c]
push dword [esi + 0x308]
push dword [esi + 0x360]
call edi
jmp 0x1000846e
lea eax, [esi + 0x2f0]
push eax
push esi
call fcn.1000fdc6
pop ecx
test eax, eax
pop ecx
jg 0x100082cb
pop edi
pop esi
pop ebx
pop ebp
ret 8