Function at 0x100021a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10013aa8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x100192e0]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x100192e0]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
mov edx, ecx
mov dword [esp + 0x14], edx
jne 0x100021ec
xor eax, eax
jmp 0x100025b8
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x10002216
mov eax, dword [edx + 0x34]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x10002216
add dword [eax], 0xffffffff
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
jmp 0x100025b8
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x100025b5
cmp dword [edx + 0x3c], 0
jne 0x10002244
push eax
movsx eax, bl
push eax
call fcn.10005a84
add esp, 8
cmp eax, 0xffffffff
je 0x100025b5
mov eax, ebx
jmp 0x100025b8
lea esi, [esp + 0x24]
mov byte [esp + 0x13], bl
call fcn.100034d0
mov dword [esp + 0x50], 0
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
cmp ecx, 0x10
jb 0x10002528
test eax, eax
mov esi, eax
mov dword [esp + 0x18], esi
je 0x10002298
cmp ecx, 0x10
mov edx, eax
jae 0x10002283
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x10002298
cmp ecx, 0x10
mov edx, eax
jae 0x10002292
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jbe 0x100022a9
call fcn.10005435
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffe
je 0x100022d4
cmp ecx, 0x10
mov edx, eax
jae 0x100022bd
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jb 0x100022d4
call fcn.10005435
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
cmp ecx, 0x10
mov ebx, edi
jb 0x10002535
test eax, eax
mov esi, eax
je 0x10002305
cmp ecx, 0x10
mov edx, eax
jae 0x100022f0
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x10002305
cmp ecx, 0x10
mov edx, eax
jae 0x100022ff
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jbe 0x10002316
call fcn.10005435
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffe
je 0x10002333
cmp ecx, 0x10
jae 0x10002328
lea eax, [esp + 0x28]
add eax, edi
cmp esi, eax
jb 0x10002333
call fcn.10005435
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
add eax, ebx
push eax
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [edi + 0x44]
push eax
call edx
test eax, eax
jl 0x100025ac
cmp eax, 1
jg 0x10002569
mov ecx, dword [esp + 0x3c]
cmp ecx, 0x10
mov eax, dword [esp + 0x28]
jb 0x1000253e
test eax, eax
mov esi, eax
je 0x100023ad
cmp ecx, 0x10
mov edx, eax
jae 0x10002394
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x100023ad
cmp ecx, 0x10
mov edx, eax
jae 0x100023a3
lea edx, [esp + 0x28]
mov edi, dword [esp + 0x38]
add edx, edi
cmp esi, edx
jbe 0x100023be
call fcn.10005435
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffe
je 0x100023e9
cmp ecx, 0x10
mov edx, eax
jae 0x100023d2
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jb 0x100023e9
call fcn.10005435
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x20]
sub ebx, esi
je 0x1000247a
cmp ecx, 0x10
jb 0x10002547
test eax, eax
mov esi, eax
je 0x10002424
cmp ecx, 0x10
mov edx, eax
jae 0x1000240f
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x10002424
cmp ecx, 0x10
mov edx, eax
jae 0x1000241e
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jbe 0x10002435
call fcn.10005435
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffe
je 0x10002452
cmp ecx, 0x10
jae 0x10002447
lea eax, [esp + 0x28]
add eax, edi
cmp esi, eax
jb 0x10002452
call fcn.10005435
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x4c]
push ecx
push ebx
push 1
push esi
call fcn.10005289
add esp, 0x10
cmp ebx, eax
jne 0x100025ac
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov byte [edx + 0x41], 1
lea edx, [esp + 0x13]
cmp dword [esp + 0x1c], edx
jne 0x1000259e
test ebx, ebx
ja 0x10002265
cmp edi, 0x20
jae 0x100025ac
or edx, 0xffffffff
sub edx, edi
cmp edx, 8
ja 0x100024bc
call fcn.10004d0c
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea esi, [edi + 8]
cmp esi, 0xfffffffe
jbe 0x100024d5
call fcn.10004d0c
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
cmp ecx, esi
jae 0x10002550
push edi
push esi
lea ecx, [esp + 0x2c]
call fcn.10004090
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
test esi, esi
jbe 0x10002265
cmp ecx, 0x10
mov ecx, eax
jae 0x10002503
lea ecx, [esp + 0x28]
xor eax, eax
add ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
cmp dword [esp + 0x3c], 0x10
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], esi
jae 0x1000251f
lea eax, [esp + 0x28]
mov byte [eax + esi], 0
jmp 0x10002259
lea esi, [esp + 0x28]
mov dword [esp + 0x18], esi
jmp 0x10002278
lea esi, [esp + 0x28]
jmp 0x100022e5
lea esi, [esp + 0x28]
jmp 0x10002389
lea esi, [esp + 0x28]
jmp 0x10002404
test esi, esi
jne 0x100024f2
cmp ecx, 0x10
mov dword [esp + 0x38], esi
jae 0x10002561
lea eax, [esp + 0x28]
mov byte [eax], 0
jmp 0x10002259
cmp eax, 3
jne 0x100025ac
mov eax, dword [edi + 0x4c]
mov cl, byte [esp + 0x13]
call fcn.10001950
test al, al
je 0x1000258e
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x24]
call fcn.10001ca0
mov eax, esi
jmp 0x100025b8
lea ecx, [esp + 0x24]
or esi, 0xffffffff
call fcn.10001ca0
mov eax, esi
jmp 0x100025b8
lea ecx, [esp + 0x24]
call fcn.10001ca0
mov eax, dword [ebp + 8]
jmp 0x100025b8
lea ecx, [esp + 0x24]
call fcn.10001ca0
or eax, 0xffffffff
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.100050b0
mov esp, ebp
pop ebp
ret 4