Function at 0x100a8c7
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, esi
sub edi, dword [ecx + 0xc]
add esi, 0xfffffffc
shr edi, 0xf
mov ecx, edi
imul ecx, ecx, 0x204
lea ecx, [ecx + eax + 0x144]
mov dword [ebp - 0x10], ecx
mov ecx, dword [esi]
dec ecx
test cl, 1
mov dword [ebp - 4], ecx
jne 0x100a956
push ebx
lea ebx, [ecx + esi]
mov edx, dword [ebx]
mov dword [ebp - 0xc], edx
mov edx, dword [esi - 4]
mov dword [ebp - 8], edx
mov edx, dword [ebp - 0xc]
test dl, 1
mov dword [ebp + 0xc], ebx
jne 0x100a70d
sar edx, 4
dec edx
cmp edx, 0x3f
jbe 0x100a6a5
push 0x3f
pop edx
mov ecx, dword [ebx + 4]
cmp ecx, dword [ebx + 8]
jne 0x100a6ef
cmp edx, 0x20
mov ebx, 0x80000000
jae 0x100a6d0
mov ecx, edx
shr ebx, cl
lea ecx, [edx + eax + 4]
not ebx
and dword [eax + edi*4 + 0x44], ebx
dec byte [ecx]
jne 0x100a6ec
mov ecx, dword [ebp + 8]
and dword [ecx], ebx
jmp 0x100a6ec
lea ecx, [edx - 0x20]
shr ebx, cl
lea ecx, [edx + eax + 4]
not ebx
and dword [eax + edi*4 + 0xc4], ebx
dec byte [ecx]
jne 0x100a6ec
mov ecx, dword [ebp + 8]
and dword [ecx + 4], ebx
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebx + 8]
mov ebx, dword [ebx + 4]
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
mov dword [edx + 4], ebx
mov edx, dword [ebp + 0xc]
mov ebx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [ebx + 8], edx
mov dword [ebp - 4], ecx
mov edx, ecx
sar edx, 4
dec edx
cmp edx, 0x3f
jbe 0x100a71b
push 0x3f
pop edx
mov ebx, dword [ebp - 8]
and ebx, 1
mov dword [ebp - 0xc], ebx
jne 0x100a7b9
sub esi, dword [ebp - 8]
mov ebx, dword [ebp - 8]
sar ebx, 4
push 0x3f
mov dword [ebp + 0xc], esi
dec ebx
pop esi
cmp ebx, esi
jbe 0x100a740
mov ebx, esi
add ecx, dword [ebp - 8]
mov edx, ecx
sar edx, 4
dec edx
cmp edx, esi
mov dword [ebp - 4], ecx
jbe 0x100a752
mov edx, esi
cmp ebx, edx
je 0x100a7b4
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 4]
cmp esi, dword [ecx + 8]
jne 0x100a79c
cmp ebx, 0x20
mov esi, 0x80000000
jae 0x100a782
mov ecx, ebx
shr esi, cl
not esi
and dword [eax + edi*4 + 0x44], esi
dec byte [ebx + eax + 4]
jne 0x100a79c
mov ecx, dword [ebp + 8]
and dword [ecx], esi
jmp 0x100a79c
lea ecx, [ebx - 0x20]
shr esi, cl
not esi
and dword [eax + edi*4 + 0xc4], esi
dec byte [ebx + eax + 4]
jne 0x100a79c
mov ecx, dword [ebp + 8]
and dword [ecx + 4], esi
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 8]
mov ecx, dword [ecx + 4]
mov dword [esi + 4], ecx
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esi + 8], ecx
mov esi, dword [ebp + 0xc]
jmp 0x100a7bc
mov ebx, dword [ebp + 8]
cmp dword [ebp - 0xc], 0
jne 0x100a7ca
cmp ebx, edx
je 0x100a84a
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx + edx*8]
mov ebx, dword [ecx + 4]
mov dword [esi + 8], ecx
mov dword [esi + 4], ebx
mov dword [ecx + 4], esi
mov ecx, dword [esi + 4]
mov dword [ecx + 8], esi
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
jne 0x100a84a
mov cl, byte [edx + eax + 4]
mov byte [ebp + 0xf], cl
inc cl
cmp edx, 0x20
mov byte [edx + eax + 4], cl
jae 0x100a821
cmp byte [ebp + 0xf], 0
jne 0x100a810
mov ecx, edx
mov ebx, 0x80000000
shr ebx, cl
mov ecx, dword [ebp + 8]
or dword [ecx], ebx
mov ebx, 0x80000000
mov ecx, edx
shr ebx, cl
lea eax, [eax + edi*4 + 0x44]
or dword [eax], ebx
jmp 0x100a84a
cmp byte [ebp + 0xf], 0
jne 0x100a837
lea ecx, [edx - 0x20]
mov ebx, 0x80000000
shr ebx, cl
mov ecx, dword [ebp + 8]
or dword [ecx + 4], ebx
lea ecx, [edx - 0x20]
mov edx, 0x80000000
shr edx, cl
lea eax, [eax + edi*4 + 0xc4]
or dword [eax], edx
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov dword [eax + esi - 4], eax
mov eax, dword [ebp - 0x10]
dec dword [eax]
jne 0x100a955
mov eax, dword [0x100f944]
test eax, eax
je 0x100a947
mov ecx, dword [0x100f95c]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x4000
shl ecx, 0xf
add ecx, dword [eax + 0xc]
mov ebx, 0x8000
push ebx
push ecx
call esi
mov ecx, dword [0x100f95c]
mov eax, dword [0x100f944]
mov edx, 0x80000000
shr edx, cl
or dword [eax + 8], edx
mov eax, dword [0x100f944]
mov eax, dword [eax + 0x10]
mov ecx, dword [0x100f95c]
and dword [eax + ecx*4 + 0xc4], 0
mov eax, dword [0x100f944]
mov eax, dword [eax + 0x10]
dec byte [eax + 0x43]
mov eax, dword [0x100f944]
mov ecx, dword [eax + 0x10]
cmp byte [ecx + 0x43], 0
jne 0x100a8d8
and dword [eax + 4], 0xfffffffe
mov eax, dword [0x100f944]
cmp dword [eax + 8], 0xffffffff
jne 0x100a947
push ebx
push 0
push dword [eax + 0xc]
call esi
mov eax, dword [0x100f944]
push dword [eax + 0x10]
push 0
push dword [0x100fba0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [0x100f948]
mov edx, dword [0x100f94c]
lea eax, [eax + eax*4]
shl eax, 2
mov ecx, eax
mov eax, dword [0x100f944]
sub ecx, eax
lea ecx, [ecx + edx - 0x14]
push ecx
lea ecx, [eax + 0x14]
push ecx
push eax
call fcn.01007d50
mov eax, dword [ebp + 8]
add esp, 0xc
dec dword [0x100f948]
cmp eax, dword [0x100f944]
jbe 0x100a93d
sub dword [ebp + 8], 0x14
mov eax, dword [0x100f94c]
mov dword [0x100f954], eax
mov eax, dword [ebp + 8]
mov dword [0x100f944], eax
mov dword [0x100f95c], edi
pop ebx
pop edi
pop esi
leave
ret