Function at 0x10ba9f6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov di, word [eax + 0x540]
or dword [ebp - 0x1c], 0xffffffff
or dword [ebp - 0x24], 0xffffffff
or dword [ebp - 0x20], 0xffffffff
xor eax, eax
mov word [ebx + 0x2062], 1
mov dword [ebx + 0x23e0], eax
mov dword [ebx + 0x23e4], eax
mov word [ebx + 0x2060], 1
push dword [esi + 0x44]
mov dword [ebp - 4], eax
push dword [esi + 0x38]
mov dword [ebp - 0x10], eax
push edi
mov byte [ebp - 0x14], 0x40
mov word [ebp - 0x18], ax
mov word [ebp - 0x16], ax
call fcn.0108bee4
test ax, ax
je 0x10baa74
mov ax, 0xfdff
pop edi
pop esi
pop ebx
leave
ret 0xc
call fcn.0106e781
lea eax, [ebp - 0x64]
push eax
push edi
call fcn.0108c332
cmp ax, 1
je 0x10baa6f
mov cx, word [ebp - 0x58]
test cx, cx
je 0x10baa99
cmp cx, 5
je 0x10baa99
mov ax, 0xfdf8
jmp 0x10baa68
mov eax, dword [esi + 0x40]
mov edx, dword [ebp - 0x5c]
cmp edx, eax
jb 0x10baaa8
mov dword [esi + 0x48], eax
jmp 0x10baaab
mov dword [esi + 0x48], edx
and dword [esi + 0x50], 0
lea eax, [ebx + 4]
push eax
push 0x1012e48
push 0x1012e28
push ebx
mov word [esi + 0x58], cx
call fcn.010b983e
test eax, eax
mov dword [ebx], eax
je 0x10bad47
cmp dword [esi + 0x48], 0xb
push 0xb
push esi
jae 0x10baaf6
push dword [ebp + 8]
call fcn.010b9eea
test ax, ax
mov dword [ebp - 4], eax
jne 0x10bad4e
mov edi, dword [ebx + 0x2044]
jmp 0x10bab01
mov edi, dword [esi + 0x50]
add edi, dword [esi + 0x38]
call fcn.0109f691
movzx ecx, byte [edi]
mov dl, byte [edi + 1]
mov byte [ebp + 0x13], dl
sub ecx, 0xa
and byte [ebp + 0x13], 0x20
mov byte [ebp - 5], dl
je 0x10bab41
or dword [ebp - 0x3c], 0xffffffff
or dword [ebp - 0x38], 0xffffffff
mov al, dl
shl al, 1
not al
and al, 4
and dl, 0x18
or al, dl
mov edx, dword [edi + 2]
or al, 0x40
cmp dword [edi + 6], 0
mov byte [ebp - 0x2c], al
mov dword [ebp - 0x34], edx
je 0x10bab41
or al, 1
mov byte [ebp - 0x2c], al
cmp dword [esi + 0x48], ecx
push ecx
push esi
jae 0x10bab5e
push dword [ebp + 8]
call fcn.010b9eea
test ax, ax
mov dword [ebp - 4], eax
jne 0x10bad4e
jmp 0x10bab63
call fcn.0109f691
cmp dword [esi + 0x48], 1
push 1
push esi
jae 0x10bab8b
push dword [ebp + 8]
call fcn.010b9eea
test ax, ax
mov dword [ebp - 4], eax
jne 0x10bad4e
mov eax, dword [ebx + 0x2044]
movzx edi, byte [eax]
jmp 0x10bab9a
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x38]
movzx edi, byte [eax + ecx]
call fcn.0109f691
cmp dword [esi + 0x48], edi
push edi
push esi
jae 0x10babc0
push dword [ebp + 8]
call fcn.010b9eea
test ax, ax
mov dword [ebp - 4], eax
jne 0x10bad4e
mov eax, dword [ebx + 0x2044]
mov dword [ebp - 0xc], eax
jmp 0x10babce
mov eax, dword [esi + 0x50]
add eax, dword [esi + 0x38]
mov dword [ebp - 0xc], eax
call fcn.0109f691
cmp byte [ebp + 0x13], 0
je 0x10babf3
push dword [ebp - 0xc]
lea eax, [ebp - 0x3c]
push eax
push ebx
mov word [ebp - 0x30], di
call fcn.010b9965
test ax, ax
mov dword [ebp - 4], eax
jne 0x10bad4e
jmp 0x10bac00
inc dword [ebx + 0x23e4]
mov dword [ebp - 0x10], 1
test byte [ebp - 5], 0x40
je 0x10bacdc
mov eax, dword [ebx + 0x102c]
add eax, dword [ebx + 0x203c]
cmp eax, 0xfffffffe
je 0x10bacdc
cmp word [ebp - 0x10], 0
jne 0x10bac2c
or byte [ebp - 0x14], 0x80
jmp 0x10bac30
and dword [ebp - 0x10], 0
push dword [ebx]
mov esi, dword [sym.imp.msvcrt.dll_fwrite]
push 1
lea eax, [ebp - 0x24]
push 0x11
push eax
call esi
add esp, 0x10
cmp eax, 1
jne 0x10bad47
cmp word [ebp - 0x18], 0
je 0x10bac76
push dword [ebx]
movzx eax, word [ebp - 0x18]
push eax
lea eax, [ebp - 0x164]
push 1
push eax
call esi
movzx ecx, word [ebp - 0x18]
add esp, 0x10
cmp ecx, eax
jne 0x10bad47
inc dword [ebx + 0x23e0]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x28]
push eax
push ebx
call fcn.010b9a0f
test ax, ax
mov dword [ebp - 4], eax
jne 0x10bad4e
mov eax, dword [ebp - 0x28]
mov esi, eax
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
movzx ecx, word [ebp - 0x18]
mov esi, dword [ebp - 0xc]
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x164]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [eax + 0x10], 1
je 0x10bacd9
mov eax, dword [ebx + 0x102c]
add eax, dword [ebx + 0x203c]
cmp eax, 0xfffffffe
jne 0x10bac1f
mov esi, dword [ebp + 0xc]
test byte [ebp - 5], 0x80
je 0x10baad1
cmp word [ebp - 0x10], 0
jne 0x10bacf1
or byte [ebp - 0x14], 0x80
push dword [ebx]
mov esi, dword [sym.imp.msvcrt.dll_fwrite]
push 1
lea eax, [ebp - 0x24]
push 0x11
push eax
call esi
add esp, 0x10
cmp eax, 1
jne 0x10bad47
xor edi, edi
cmp word [ebp - 0x18], di
je 0x10bad30
push dword [ebx]
movzx eax, word [ebp - 0x18]
push eax
lea eax, [ebp - 0x164]
push 1
push eax
call esi
movzx ecx, word [ebp - 0x18]
add esp, 0x10
cmp ecx, eax
jne 0x10bad47
inc dword [ebx + 0x23e0]
push edi
push edi
push dword [ebx]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x10bad59
mov dword [ebp - 4], 0xfffffdf3
lea eax, [ebx + 4]
push eax
push ebx
push ebx
call fcn.010b97ec
mov ax, word [ebp - 4]
jmp 0x10baa68