Function at 0x10021790
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100d6e90
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x10111770]
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.10019ec0
lea eax, [ebp - 0x28]
push eax
call fcn.10026940
test eax, eax
je 0x10021866
cmp dword [ebp - 0x14], 0x10
jb 0x10021819
push dword [ebp - 0x28]
call fcn.1005f2ec
add esp, 4
cmp dword [ebp + 0x1c], 0x10
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
jb 0x1002183c
push dword [ebp + 8]
call fcn.1005f2ec
add esp, 4
cmp dword [ebp + 0x34], 0x10
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
jb 0x1002185f
push dword [ebp + 0x20]
call fcn.1005f2ec
add esp, 4
xor eax, eax
jmp 0x10021a36
mov eax, dword [ebp - 0x18]
add eax, 8
push eax
call fcn.1005eb51
mov ecx, dword [ebp - 0x18]
add esp, 4
add ecx, 8
mov edi, eax
push ecx
push 0
push edi
call fcn.10065a70
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.10065b00
mov ebx, dword [ebp - 0x18]
lea ecx, [ebp - 0x40]
add esp, 0xc
call fcn.10026dd0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
inc eax
push eax
call fcn.1005eb51
mov ecx, dword [ebp - 0x30]
add esp, 4
inc ecx
mov esi, eax
push ecx
push 0
push esi
call fcn.10065a70
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.10062256
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.1005fdc0
add esp, 4
mov dword [ebp - 0x44], 0
cmp dword [ebp + 0x34], 0x10
lea eax, [ebp + 0x20]
cmovae eax, dword [ebp + 0x20]
push 0x10103e34
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.1006091a
add esp, 0xc
test eax, eax
je 0x10021990
cmp dword [ebp - 0x2c], 0x10
jb 0x10021979
push dword [ebp - 0x40]
call fcn.1005f2ec
add esp, 4
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jmp 0x10021808
push dword [ebp - 0x44]
lea eax, [ebx + 8]
push 1
push eax
push edi
call fcn.10062404
push dword [ebp - 0x44]
call fcn.100609cb
add esp, 0x14
test edi, edi
je 0x100219b7
push edi
call fcn.1005fdc0
add esp, 4
cmp dword [ebp - 0x2c], 0x10
jb 0x100219c8
push dword [ebp - 0x40]
call fcn.1005f2ec
add esp, 4
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jb 0x100219eb
push dword [ebp - 0x28]
call fcn.1005f2ec
add esp, 4
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jb 0x10021a0e
push dword [ebp + 8]
call fcn.1005f2ec
add esp, 4
cmp dword [ebp + 0x34], 0x10
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
jb 0x10021a31
push dword [ebp + 0x20]
call fcn.1005f2ec
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.1005f2f1
mov esp, ebp
pop ebp
ret