Function at 0x10021b10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100d8440
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x10112770]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
lea eax, [ebp + 8]
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.1001a1f0
lea eax, [ebp - 0x28]
push eax
call fcn.10026d50
test eax, eax
je 0x10021be6
cmp dword [ebp - 0x14], 0x10
jb 0x10021b99
push dword [ebp - 0x28]
call fcn.1005fb8c
add esp, 4
cmp dword [ebp + 0x1c], 0x10
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
jb 0x10021bbc
push dword [ebp + 8]
call fcn.1005fb8c
add esp, 4
cmp dword [ebp + 0x34], 0x10
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
jb 0x10021bdf
push dword [ebp + 0x20]
call fcn.1005fb8c
add esp, 4
xor eax, eax
jmp 0x10021db6
mov eax, dword [ebp - 0x18]
add eax, 8
push eax
call fcn.1005f3f1
mov ecx, dword [ebp - 0x18]
add esp, 4
add ecx, 8
mov edi, eax
push ecx
push 0
push edi
call fcn.10066410
add esp, 0xc
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
cmovae ecx, dword [ebp - 0x28]
push dword [ebp - 0x18]
push ecx
push edi
call fcn.100664a0
mov ebx, dword [ebp - 0x18]
lea ecx, [ebp - 0x40]
add esp, 0xc
call fcn.10027650
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
inc eax
push eax
call fcn.1005f3f1
mov ecx, dword [ebp - 0x30]
add esp, 4
inc ecx
mov esi, eax
push ecx
push 0
push esi
call fcn.10066410
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x40]
add esp, 0xc
cmp dword [ebp - 0x2c], 0x10
cmovae ecx, dword [ebp - 0x40]
inc eax
push ecx
push eax
push esi
call fcn.10062bfc
movzx eax, byte [esi]
add esp, 0xc
xor al, 2
mov byte [ebx + edi], al
movzx eax, byte [esi + 1]
xor al, 2
mov byte [ebx + edi + 1], al
movzx eax, byte [esi + 2]
xor al, 2
mov byte [ebx + edi + 2], al
movzx eax, byte [esi + 3]
xor al, 2
mov byte [ebx + edi + 3], al
movzx eax, byte [esi + 4]
xor al, 2
mov byte [ebx + edi + 4], al
movzx eax, byte [esi + 5]
xor al, 2
mov byte [ebx + edi + 5], al
movzx eax, byte [esi + 6]
xor al, 2
mov byte [ebx + edi + 6], al
movzx eax, byte [esi + 7]
xor al, 2
push esi
mov byte [ebx + edi + 7], al
call fcn.10060660
add esp, 4
mov dword [ebp - 0x44], 0
cmp dword [ebp + 0x34], 0x10
lea eax, [ebp + 0x20]
cmovae eax, dword [ebp + 0x20]
push 0x10104e94
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.1006124c
add esp, 0xc
test eax, eax
je 0x10021d10
cmp dword [ebp - 0x2c], 0x10
jb 0x10021cf9
push dword [ebp - 0x40]
call fcn.1005fb8c
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jmp 0x10021b88
push dword [ebp - 0x44]
lea eax, [ebx + 8]
push 1
push eax
push edi
call fcn.10062daa
push dword [ebp - 0x44]
call fcn.100612fd
add esp, 0x14
test edi, edi
je 0x10021d37
push edi
call fcn.10060660
add esp, 4
cmp dword [ebp - 0x2c], 0x10
jb 0x10021d48
push dword [ebp - 0x40]
call fcn.1005fb8c
add esp, 4
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jb 0x10021d6b
push dword [ebp - 0x28]
call fcn.1005fb8c
add esp, 4
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jb 0x10021d8e
push dword [ebp + 8]
call fcn.1005fb8c
add esp, 4
cmp dword [ebp + 0x34], 0x10
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
jb 0x10021db1
push dword [ebp + 0x20]
call fcn.1005fb8c
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005fb91
mov esp, ebp
pop ebp
ret