Function at 0x10d01f1
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x174
mov eax, dword [0x10e607c]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x140], eax
mov eax, dword [eax + 4]
mov di, word [eax + 0x940]
or dword [ebp - 0x150], 0xffffffff
or dword [ebp - 0x158], 0xffffffff
or dword [ebp - 0x154], 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 - 0x15c], esi
push dword [esi + 0x38]
mov dword [ebp - 0x134], eax
push edi
mov dword [ebp - 0x13c], eax
mov byte [ebp - 0x148], 0x40
mov word [ebp - 0x14c], ax
mov word [ebp - 0x14a], ax
call fcn.0109c546
test ax, ax
je 0x10d02a5
mov ax, 0xfdff
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01078836
leave
ret 0xc
call fcn.0107875a
lea eax, [ebp - 0x12c]
push eax
push edi
call fcn.0109ca1f
cmp ax, 1
je 0x10d02a0
mov cx, word [ebp - 0x120]
test cx, cx
je 0x10d02d0
cmp cx, 5
je 0x10d02d0
mov ax, 0xfdf8
jmp 0x10d0291
mov eax, dword [esi + 0x40]
mov edx, dword [ebp - 0x124]
cmp edx, eax
jb 0x10d02e2
mov dword [esi + 0x48], eax
jmp 0x10d02e5
mov dword [esi + 0x48], edx
and dword [esi + 0x50], 0
lea eax, [ebx + 4]
push eax
push 0x1013cac
push 0x1013c8c
push ebx
mov word [esi + 0x58], cx
call fcn.010cefc5
test eax, eax
mov dword [ebx], eax
je 0x10d060e
cmp dword [esi + 0x48], 0xb
push 0xb
push esi
jae 0x10d0336
push dword [ebp - 0x140]
call fcn.010cf6a7
test ax, ax
mov dword [ebp - 0x134], eax
jne 0x10d0618
mov edi, dword [ebx + 0x2044]
jmp 0x10d0341
mov edi, dword [esi + 0x50]
add edi, dword [esi + 0x38]
call fcn.010b1c0d
movzx ecx, byte [edi]
mov dl, byte [edi + 1]
mov byte [ebp - 0x12d], dl
sub ecx, 0xa
and byte [ebp - 0x12d], 0x20
mov byte [ebp - 0x135], dl
je 0x10d0399
or dword [ebp - 0x174], 0xffffffff
or dword [ebp - 0x170], 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 - 0x164], al
mov dword [ebp - 0x16c], edx
je 0x10d0399
or al, 1
mov byte [ebp - 0x164], al
cmp dword [esi + 0x48], ecx
push ecx
push esi
jae 0x10d03bc
push dword [ebp - 0x140]
call fcn.010cf6a7
test ax, ax
mov dword [ebp - 0x134], eax
jne 0x10d0618
jmp 0x10d03c1
call fcn.010b1c0d
cmp dword [esi + 0x48], 1
push 1
push esi
jae 0x10d03ef
push dword [ebp - 0x140]
call fcn.010cf6a7
test ax, ax
mov dword [ebp - 0x134], eax
jne 0x10d0618
mov eax, dword [ebx + 0x2044]
movzx edi, byte [eax]
jmp 0x10d03fe
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x38]
movzx edi, byte [eax + ecx]
call fcn.010b1c0d
cmp dword [esi + 0x48], edi
push edi
push esi
jae 0x10d042d
push dword [ebp - 0x140]
call fcn.010cf6a7
test ax, ax
mov dword [ebp - 0x134], eax
jne 0x10d0618
mov eax, dword [ebx + 0x2044]
mov dword [ebp - 0x144], eax
jmp 0x10d043e
mov eax, dword [esi + 0x50]
add eax, dword [esi + 0x38]
mov dword [ebp - 0x144], eax
call fcn.010b1c0d
cmp byte [ebp - 0x12d], 0
je 0x10d0472
push dword [ebp - 0x144]
lea eax, [ebp - 0x174]
push eax
push ebx
mov word [ebp - 0x168], di
call fcn.010cf0f8
test ax, ax
mov dword [ebp - 0x134], eax
jne 0x10d0618
jmp 0x10d0482
inc dword [ebx + 0x23e4]
mov dword [ebp - 0x13c], 1
test byte [ebp - 0x135], 0x40
je 0x10d058e
mov eax, dword [ebx + 0x102c]
add eax, dword [ebx + 0x203c]
cmp eax, 0xfffffffe
je 0x10d058e
cmp word [ebp - 0x13c], 0
jne 0x10d04b7
or byte [ebp - 0x148], 0x80
jmp 0x10d04be
and dword [ebp - 0x13c], 0
push dword [ebx]
mov esi, dword [sym.imp.msvcrt.dll_fwrite]
push 1
lea eax, [ebp - 0x158]
push 0x11
push eax
call esi
add esp, 0x10
cmp eax, 1
jne 0x10d060e
cmp word [ebp - 0x14c], 0
je 0x10d0510
push dword [ebx]
movzx eax, word [ebp - 0x14c]
push eax
lea eax, [ebp - 0x104]
push 1
push eax
call esi
movzx ecx, word [ebp - 0x14c]
add esp, 0x10
cmp ecx, eax
jne 0x10d060e
inc dword [ebx + 0x23e0]
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x160]
push eax
push ebx
call fcn.010cf1a9
test ax, ax
mov dword [ebp - 0x134], eax
jne 0x10d0618
mov eax, dword [ebp - 0x160]
mov esi, eax
lea edi, [ebp - 0x158]
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 - 0x14c]
mov esi, dword [ebp - 0x144]
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x104]
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 0x10d0588
mov eax, dword [ebx + 0x102c]
add eax, dword [ebx + 0x203c]
cmp eax, 0xfffffffe
jne 0x10d04a4
mov esi, dword [ebp - 0x15c]
test byte [ebp - 0x135], 0x80
je 0x10d030b
cmp word [ebp - 0x13c], 0
jne 0x10d05ac
or byte [ebp - 0x148], 0x80
push dword [ebx]
mov esi, dword [sym.imp.msvcrt.dll_fwrite]
push 1
lea eax, [ebp - 0x158]
push 0x11
push eax
call esi
add esp, 0x10
cmp eax, 1
jne 0x10d060e
xor edi, edi
cmp word [ebp - 0x14c], di
je 0x10d05f7
push dword [ebx]
movzx eax, word [ebp - 0x14c]
push eax
lea eax, [ebp - 0x104]
push 1
push eax
call esi
movzx ecx, word [ebp - 0x14c]
add esp, 0x10
cmp ecx, eax
jne 0x10d060e
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 0x10d0623
mov dword [ebp - 0x134], 0xfffffdf3
lea eax, [ebx + 4]
push eax
push ebx
push ebx
call fcn.010cef6b
mov ax, word [ebp - 0x134]
jmp 0x10d0291