Function at 0x1000d733
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
push ebx
mov ebx, dword [ebp + 0x14]
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x1000d765
cmp ebx, 2
je 0x1000d80d
cmp ebx, 1
je 0x1000d80d
mov eax, 0x10000
jmp 0x1000da84
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x1000d7b4
cmp eax, 0xffffffff
je 0x1000d77c
push dword [esi]
call fcn.1000d0b2
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x1000d75b
cmp edi, dword [eax + 0x10]
jge 0x1000d793
push eax
call fcn.1000cafd
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x1000d7a2
push eax
call fcn.1000cb3b
jmp 0x1000d792
push dword [esi + 0x138]
push dword [esi]
call fcn.1000cd38
pop ecx
mov dword [esi + 4], edi
pop ecx
lea eax, [ebp + 0xb]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call fcn.1000ce98
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x1000d7da
push dword [esi]
call fcn.1000d0b2
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp + 0xb], 0
je 0x1000d7e7
xor eax, eax
jmp 0x1000da84
test edi, edi
jle 0x1000d7f5
mov eax, 0x600
jmp 0x1000da84
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x1000da84
cmp dword [esi + 4], 0xffffffff
je 0x1000d81b
push dword [esi]
call fcn.1000d0b2
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 8]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x1000d75b
cmp edi, dword [eax + 0x10]
jge 0x1000d839
push eax
call fcn.1000cafd
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x1000d848
push eax
call fcn.1000cb3b
jmp 0x1000d838
lea eax, [ebp - 0x234]
mov ecx, esi
push eax
push edi
call fcn.1000d1bd
mov eax, dword [ebp - 0x12c]
shr eax, 4
test al, 1
je 0x1000d89d
cmp ebx, 1
je 0x1000d7e0
mov ecx, dword [ebp + 0xc]
mov al, byte [ecx]
cmp al, 0x2f
je 0x1000d884
cmp al, 0x5c
je 0x1000d884
test al, al
je 0x1000d889
cmp byte [ecx + 1], 0x3a
jne 0x1000d889
push ecx
push 0
jmp 0x1000d891
add esi, 0x140
push ecx
push esi
call fcn.1000d601
pop ecx
pop ecx
jmp 0x1000d7e0
and byte [ebp - 0x338], 0
cmp ebx, 1
jne 0x1000d8b1
mov eax, dword [ebp + 0xc]
jmp 0x1000d93e
mov edi, dword [ebp + 0xc]
mov ebx, edi
mov ecx, edi
mov al, byte [edi]
test al, al
je 0x1000d8cf
cmp al, 0x2f
je 0x1000d8c6
cmp al, 0x5c
jne 0x1000d8c9
lea ebx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
jmp 0x1000d8ba
push 0x104
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.100136da
add esp, 0xc
cmp ebx, edi
jne 0x1000d950
and byte [ebp - 0x108], 0
lea eax, [ebp - 0x108]
lea edi, [esi + 0x140]
push ebx
push eax
push edi
lea eax, [ebp - 0x338]
push str._s_s_s
push eax
call fcn.10011f5b
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.1000d601
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp - 0x12c]
push 2
push eax
push eax
lea eax, [ebp - 0x338]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x10], eax
jne 0x1000d9b7
mov eax, 0x200
jmp 0x1000da84
mov eax, ebx
sub eax, edi
and byte [ebp + eax - 0x108], 0
cmp byte [ebp - 0x108], 0x2f
je 0x1000d988
cmp byte [ebp - 0x108], 0x5c
je 0x1000d988
cmp byte [ebp - 0x108], 0
je 0x1000d8ef
cmp byte [ebp - 0x107], 0x3a
jne 0x1000d8ef
lea eax, [ebp - 0x108]
push ebx
push eax
lea eax, [ebp - 0x338]
push str._s_s
push eax
call fcn.10011f5b
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.1000d601
add esp, 0x18
jmp 0x1000d91f
push dword [esi + 0x138]
push dword [esi]
call fcn.1000cd38
cmp dword [esi + 0x13c], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x1000d9e1
push ebx
call fcn.10012c1b
pop ecx
mov dword [esi + 0x13c], eax
and dword [ebp + 8], 0
lea eax, [ebp + 0xf]
push eax
push ebx
push dword [esi + 0x13c]
push dword [esi]
call fcn.1000ce98
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x1000da2d
test edi, edi
jl 0x1000da3f
jle 0x1000da21
lea eax, [ebp - 4]
push 0
push eax
push edi
push dword [esi + 0x13c]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000da36
cmp byte [ebp + 0xf], 0
jne 0x1000da46
test edi, edi
je 0x1000da3f
jmp 0x1000d9e5
mov dword [ebp + 8], 0x1000
jmp 0x1000da46
mov dword [ebp + 8], 0x400
jmp 0x1000da46
mov dword [ebp + 8], 0x5000000
push dword [esi]
call fcn.1000d0b2
cmp dword [ebp + 8], 0
pop ecx
jne 0x1000da72
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x120]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x1000da81
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 0x10