Function at 0x100a865
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax + 4]
mov eax, dword [eax + 0xc]
lea esi, [edi + 0x18]
mov ecx, dword [esi + 8]
xor ebx, ebx
shl ecx, 4
add eax, edi
cmp dword [edi + 8], ebx
lea ecx, [ecx + esi + 0x28]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
mov dword [ebp - 8], ebx
jbe 0x100ab22
mov eax, dword [esi + 8]
or eax, dword [esi + 0xc]
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
je 0x100a85f
mov eax, dword [edi + 8]
mov dword [reloc.msvcrt.dll___p__commode], eax
mov dword [reloc.msvcrt.dll___p__commode], ebx
xor eax, eax
and dword [ebp - 0x18], eax
xor ecx, ecx
inc ecx
cmp eax, dword [esi + 0xc]
lea edx, [esi + 0x28]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], ecx
jg 0x100a90b
jl 0x100a889
mov eax, ecx
cmp eax, dword [esi + 8]
jae 0x100a90b
mov eax, dword [ebp - 0x14]
shl eax, 4
add eax, edx
mov ecx, dword [eax + 4]
mov ebx, dword [eax - 0xc]
mov dword [ebp - 0x20], ecx
mov ecx, dword [eax - 0x10]
add ecx, dword [eax - 8]
adc ebx, dword [eax - 4]
cmp ecx, dword [eax]
mov dword [ebp - 0x30], ebx
jne 0x100a8c8
mov ecx, dword [ebp - 0x20]
cmp ebx, ecx
jne 0x100a8c8
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [eax + 8]
shl ecx, 4
lea ecx, [ecx + edx - 8]
add dword [ecx], ebx
mov eax, dword [eax + 0xc]
adc dword [ecx + 4], eax
jmp 0x100a8ee
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [eax]
shl ecx, 4
add ecx, edx
add dword [ebp - 0x1c], 1
mov dword [ecx], ebx
mov ebx, dword [ebp - 0x20]
adc dword [ebp - 0x18], 0
mov dword [ecx + 4], ebx
mov ebx, dword [eax + 8]
mov dword [ecx + 8], ebx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
add dword [ebp - 0x14], 1
adc dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xc]
jl 0x100a889
jg 0x100a908
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 8]
jb 0x100a889
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [esi + 8]
jne 0x100a918
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi + 0xc]
je 0x100a91f
and dword [esi + 0xc], 0
mov dword [esi + 8], ecx
mov eax, dword [esi + 8]
xor ecx, ecx
cmp dword [esi + 0xc], ecx
mov dword [ebp - 0x10], ecx
jl 0x100a959
jg 0x100a932
cmp eax, ecx
jbe 0x100a959
mov eax, ecx
shl eax, 4
mov ebx, dword [eax + edx]
and ebx, dword [eax + edx + 4]
cmp ebx, reloc.msvcrt.dll___p__commode
jne 0x100a959
add ecx, 1
adc dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xc]
jl 0x100a932
jg 0x100a959
cmp ecx, dword [esi + 8]
jb 0x100a932
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
add ecx, 1
mov dword [ebp - 0x18], eax
adc eax, 0
cmp eax, dword [esi + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
jg 0x100a99f
jge 0x100a99a
mov eax, ecx
shl eax, 4
mov ebx, dword [eax + edx]
and ebx, dword [eax + edx + 4]
cmp ebx, reloc.msvcrt.dll___p__commode
jne 0x100a99f
add ecx, 1
adc dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xc]
mov dword [ebp - 0x14], ecx
jl 0x100a975
jg 0x100a99f
cmp ecx, dword [esi + 8]
jb 0x100a975
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xc]
jg 0x100aab5
jl 0x100a9b6
cmp ecx, dword [esi + 8]
jae 0x100aab5
mov eax, dword [reloc.msvcrt.dll___p__commode]
or eax, dword [reloc.msvcrt.dll___p__commode]
je 0x100aa0e
mov eax, ecx
shl eax, 4
add eax, edx
mov ebx, dword [eax + 4]
cmp ebx, dword [reloc.msvcrt.dll___p__commode]
mov dword [ebp - 0x20], ebx
jg 0x100aa0e
jl 0x100a9e4
mov ebx, dword [eax]
cmp ebx, dword [reloc.msvcrt.dll___p__commode]
jae 0x100aa0e
mov ecx, dword [eax + 8]
add ecx, dword [eax]
mov eax, dword [eax + 0xc]
adc eax, dword [ebp - 0x20]
cmp eax, dword [reloc.msvcrt.dll___p__commode]
jl 0x100aa0b
jg 0x100aa01
cmp ecx, dword [reloc.msvcrt.dll___p__commode]
jbe 0x100aa0b
mov dword [reloc.msvcrt.dll___p__commode], 1
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, edx
mov ebx, dword [eax + 8]
add ebx, dword [eax]
mov dword [ebp - 0x2c], ebx
mov ebx, dword [eax + 0xc]
adc ebx, dword [eax + 4]
mov eax, ecx
shl eax, 4
mov ecx, dword [eax + edx]
cmp ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ebx
jne 0x100aa3c
mov eax, dword [eax + edx + 4]
cmp eax, ebx
je 0x100aa5a
add dword [edi + 0x10], 1
push 0
pop eax
adc dword [edi + 0x14], eax
add dword [esi + 0x10], 1
adc dword [esi + 0x14], eax
add dword [reloc.msvcrt.dll___p__commode], 1
adc dword [reloc.msvcrt.dll___p__commode], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
add ecx, 1
mov dword [ebp - 0x18], eax
adc eax, 0
cmp eax, dword [esi + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
jg 0x100aaa3
jge 0x100aa9e
mov eax, ecx
shl eax, 4
mov ebx, dword [eax + edx]
and ebx, dword [eax + edx + 4]
cmp ebx, reloc.msvcrt.dll___p__commode
jne 0x100aaa3
add ecx, 1
adc dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xc]
mov dword [ebp - 0x14], ecx
jl 0x100aa79
jg 0x100aaa3
cmp ecx, dword [esi + 8]
jb 0x100aa79
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xc]
jl 0x100a9b6
jle 0x100a9ad
mov eax, dword [esi + 8]
mov ebx, dword [ebp + 8]
shl eax, 4
lea eax, [eax + esi + 0x28]
mov ecx, eax
sub ecx, dword [ebp - 4]
add dword [ebx + 0xc], ecx
mov ecx, dword [edi + 8]
dec ecx
cmp dword [ebp - 8], ecx
jae 0x100aaf5
cmp eax, dword [ebp - 4]
je 0x100aaf5
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 4]
push ecx
push dword [ebp - 4]
push eax
call dword [sym.imp.msvcrt.dll_memmove]
mov eax, dword [ebx + 0xc]
add esp, 0xc
add eax, dword [ebx + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 8]
shl eax, 4
lea esi, [esi + eax + 0x28]
cmp esi, dword [ebp - 0xc]
jae 0x100ab11
mov eax, dword [esi + 8]
shl eax, 4
lea eax, [eax + esi + 0x28]
mov dword [ebp - 4], eax
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
xor ebx, ebx
cmp eax, dword [edi + 8]
jb 0x100a843
mov edx, dword [reloc.msvcrt.dll___p__commode]
mov eax, dword [edi + 8]
xor ecx, ecx
cmp edx, ecx
jg 0x100ab45
jl 0x100ab3d
mov ecx, dword [reloc.msvcrt.dll___p__commode]
cmp ecx, eax
ja 0x100ab45
mov dword [reloc.msvcrt.dll___p__commode], ebx
jmp 0x100ab4f
mov dword [reloc.msvcrt.dll___p__commode], 1
push edi
push 0x101a268
call fcn.01009ec6
test eax, eax
pop edi
pop esi
pop ebx
jne 0x100ab79
push 0x18a
push 0x100217c
push 0x1002130
call fcn.01007320
xor eax, eax
jmp 0x100ab7c
xor eax, eax
inc eax
leave
ret 4