Function at 0x1006fddc
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
and dword [esp + 0x1c], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov dword [esp + 0x2c], edi
mov esi, ecx
test edi, edi
jne 0x1006fe05
xor eax, eax
jmp 0x1007000d
mov ecx, dword [esi + 0x140]
mov eax, ecx
mov edx, dword [esi + 0x144]
or eax, edx
je 0x1006fffa
cmp dword [esi + 0x120], 0xffffffff
je 0x1006fffa
mov eax, dword [esi + 0x11c]
and eax, 0x1000
mov dword [esp + 0x30], eax
neg eax
sbb eax, eax
and eax, 0x4000
mov dword [esp + 0x18], eax
test edx, edx
jl 0x1006ffbb
jg 0x1006fe56
test ecx, ecx
jb 0x1006ffbb
mov eax, edi
add eax, dword [esi + 0x128]
mov dword [esp + 0x20], eax
push 0
pop eax
adc eax, dword [esi + 0x12c]
cmp eax, edx
jl 0x1006ffbb
jg 0x1006fe7f
cmp dword [esp + 0x20], ecx
jbe 0x1006ffbb
mov edi, ecx
sub edi, dword [esi + 0x128]
mov dword [esp + 0x2c], edi
jmp 0x1006ffbb
cmp dword [esp + 0x30], 0
jne 0x1006fea0
mov dword [esp + 0x14], edi
jmp 0x1006ff39
lea eax, [ebx + edi]
mov ecx, ebx
cmp ebx, eax
jae 0x1006feb3
cmp byte [ecx], 0
jne 0x1006feb3
inc ecx
cmp ecx, eax
jb 0x1006fea9
mov eax, ecx
sub eax, ebx
cdq
add eax, dword [esi + 0x128]
mov dword [esp + 0x1c], eax
adc edx, dword [esi + 0x12c]
sub ebx, ecx
add edi, ebx
mov dword [esp + 0x20], edx
mov dword [esi + 0x128], eax
mov ebx, ecx
mov dword [esi + 0x12c], edx
je 0x1006ffc3
push 0
push dword [esp + 0x1c]
push edx
push eax
call fcn.101142b0
mov ecx, dword [esp + 0x18]
sub ecx, eax
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
push 0
pop ecx
sbb ecx, edx
add dword [esp + 0x10], eax
mov eax, edi
adc ecx, dword [esp + 0x20]
cdq
add eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
adc edx, dword [esp + 0x20]
cmp edx, ecx
jl 0x1006ff39
mov eax, dword [esp + 0x10]
jg 0x1006ff2f
cmp dword [esp + 0x1c], eax
jbe 0x1006ff39
sub eax, dword [esi + 0x128]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x128]
xorps xmm0, xmm0
mov edx, dword [esi + 0x12c]
mov cl, 0x20
and dword [esp + 0x44], 0
movlpd qword [esp + 0x34], xmm0
mov dword [esp + 0x3c], eax
call fcn.10114370
mov dword [esp + 0x40], eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x1c]
push ebx
push dword [esi + 0x120]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x1006ffcb
mov eax, dword [esp + 0x28]
add ebx, eax
sub edi, eax
add dword [esi + 0x138], eax
adc dword [esi + 0x13c], 0
add dword [esi + 0x128], eax
mov eax, dword [esi + 0x128]
adc dword [esi + 0x12c], 0
mov ecx, dword [esi + 0x12c]
mov dword [esi + 0x130], eax
mov dword [esi + 0x134], ecx
test edi, edi
jne 0x1006fe90
mov eax, dword [esp + 0x2c]
sub eax, edi
jmp 0x1007000d
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 5
jne 0x1006ffe4
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov dword [eax], 9
jmp 0x1006ffeb
mov ecx, eax
call fcn.1006a813
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
push 0x10020a44
push dword [eax]
jmp 0x10070001
push 0x10020a20
push 0
push esi
call sym.archiveint.dll_archive_set_error
add esp, 0xc
push 0xffffffffffffffec
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4