Function at 0x10020150
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10079040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
lea eax, [esi + 0x71]
mov byte [eax], 2
lea edi, [esi + 0xdf4]
mov word [esi + 0x72], 0
push edi
push 3
push eax
lea ebx, [esi + 0x4f1]
push ebx
call fcn.100214e0
test eax, eax
jne 0x10020387
mov eax, dword [edi]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x100201b2
push 0x39c
push str.C:UserscircleciprojectMultiCodeUtil2Cross_PlatformSourcedfu.cpp
push str.data___NULL
call fcn.10049f2a
mov eax, dword [ebp - 0xc]
add esp, 0xc
lea ecx, [esi + 0x5c]
mov dword [ebp - 8], 0
push ecx
lea ecx, [ebp - 8]
push ecx
push eax
push ebx
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1002021c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x100201e4
mov ecx, 0xffffffea
jmp 0x1002021f
push 0xffffffffffffffff
push dword [esi + 0x6c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x100201fa
mov ecx, 0xffffffea
jmp 0x1002021f
push 0
lea eax, [ebp - 8]
push eax
lea eax, [esi + 0x5c]
push eax
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [ebp - 8]
test eax, eax
mov eax, 0xffffffea
cmove ecx, eax
jmp 0x1002021f
mov ecx, dword [ebp - 8]
cmp ecx, dword [edi]
jne 0x10020387
mov ecx, esi
mov byte [esi + 0x70], 2
call fcn.10021380
test eax, eax
jne 0x10020387
mov ecx, dword [esi + 4]
cmp byte [ecx], 0x60
jne 0x10020387
mov al, byte [ecx + 1]
cmp al, byte [esi + 0x70]
jne 0x10020387
cmp byte [ecx + 2], 1
jne 0x10020387
push edi
lea eax, [esi + 0x71]
mov dword [esi], 0
push 1
push eax
mov dword [esi + 8], 0
mov dword [edi], 0
push ebx
mov byte [eax], 7
call fcn.100214e0
test eax, eax
jne 0x10020387
mov eax, dword [edi]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x100202aa
push 0x39c
push str.C:UserscircleciprojectMultiCodeUtil2Cross_PlatformSourcedfu.cpp
push str.data___NULL
call fcn.10049f2a
mov eax, dword [ebp - 0xc]
add esp, 0xc
lea ecx, [esi + 0x5c]
mov dword [ebp - 8], 0
push ecx
lea ecx, [ebp - 8]
push ecx
push eax
push ebx
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10020314
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x100202dc
mov ecx, 0xffffffea
jmp 0x10020317
push 0xffffffffffffffff
push dword [esi + 0x6c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x100202f2
mov ecx, 0xffffffea
jmp 0x10020317
push 0
lea eax, [ebp - 8]
push eax
lea eax, [esi + 0x5c]
push eax
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [ebp - 8]
test eax, eax
mov eax, 0xffffffea
cmove ecx, eax
jmp 0x10020317
mov ecx, dword [ebp - 8]
cmp ecx, dword [edi]
jne 0x10020387
mov ecx, esi
mov byte [esi + 0x70], 7
call fcn.10021380
test eax, eax
jne 0x10020387
mov edx, dword [esi + 4]
cmp byte [edx], 0x60
jne 0x10020387
mov al, byte [edx + 1]
cmp al, byte [esi + 0x70]
jne 0x10020387
cmp byte [edx + 2], 1
jne 0x10020387
movzx ecx, byte [edx + 4]
movzx eax, byte [edx + 3]
shl cx, 8
or cx, ax
mov dword [edi], 0
movzx eax, cx
mov word [esi + 0x10], ax
dec eax
cdq
sub eax, edx
mov dword [esi], 0
sar eax, 1
dec eax
mov dword [esi + 8], 0
pop edi
mov word [esi + 0x12], ax
xor eax, eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10033290
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffffea
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10033290
mov esp, ebp
pop ebp
ret