Function at 0x10d4739
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov ecx, dword [0x111124c]
mov ebx, 0x111124c
cmp ecx, ebx
je 0x10d4777
test byte [ecx + 0x1c], 1
je 0x10d4777
cmp byte [ecx + 0x19], 4
jb 0x10d4777
push 0x100ffa4
push 0x60
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.010189d0
mov ecx, dword [0x111124c]
or dword [ebp - 8], 0xffffffff
xor eax, eax
xor edx, edx
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], edx
mov byte [ebp - 1], dl
stosd dword es:[edi], eax
mov esi, 0x100ffb4
cmp dword [ebp + 8], edx
jne 0x10d47ad
push 0x1010178
push 0x947
push esi
call fcn.0107b4be
mov ecx, dword [0x111124c]
cmp dword [ebp + 0xc], 0
jne 0x10d47c9
push 0x101016c
push 0x948
push esi
call fcn.0107b4be
mov ecx, dword [0x111124c]
cmp ecx, ebx
je 0x10d47f1
test byte [ecx + 0x1c], 1
je 0x10d47f1
cmp byte [ecx + 0x19], 4
jb 0x10d47f1
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0x100ffa4
push 0x61
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.01019979
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x10d4802
cmp byte [ebp + 0x14], 0
je 0x10d4802
mov bl, 1
jmp 0x10d4804
xor bl, bl
test esi, esi
je 0x10d4812
cmp byte [ebp + 0x14], 0
mov byte [ebp + 0x17], 1
je 0x10d4816
mov byte [ebp + 0x17], 0
test bl, bl
je 0x10d482d
push 0
mov ecx, esi
call fcn.010d19c5
mov edi, eax
test edi, edi
jl 0x10d4a34
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.010f1b57
mov edi, eax
test edi, edi
jge 0x10d4882
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d4a39
test byte [eax + 0x1c], 1
je 0x10d4a39
cmp byte [eax + 0x19], 2
jb 0x10d4a39
push edi
push dword [ebp + 8]
push 0x100ffa4
push 0x62
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
jmp 0x10d4a34
test bl, bl
je 0x10d488d
mov ecx, esi
call fcn.010d1b11
cmp byte [ebp + 0x17], 0
je 0x10d48a6
push 0
mov ecx, esi
call fcn.010d19c5
mov edi, eax
test edi, edi
jl 0x10d4a34
lea eax, [ebp - 8]
push eax
xor eax, eax
push eax
push eax
push 0x80
push 2
pop ebx
push ebx
push eax
push 0xc0000000
push dword [ebp + 0xc]
call fcn.0107e3c8
mov edi, eax
test edi, edi
jge 0x10d48fe
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d4a39
test byte [eax + 0x1c], 1
je 0x10d4a39
cmp byte [eax + 0x19], bl
jb 0x10d4a39
push edi
push dword [ebp + 0xc]
push 0x100ffa4
push 0x63
jmp 0x10d4872
cmp byte [ebp + 0x17], 0
mov byte [ebp - 1], 1
je 0x10d490f
mov ecx, esi
call fcn.010d1b11
mov eax, dword [ebp - 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x10d4915
sub eax, edx
sar eax, 1
push 0
lea esi, [eax + eax + 2]
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10d4987
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10d4952
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d4a39
test byte [eax + 0x1c], 1
je 0x10d4a39
cmp byte [eax + 0x19], bl
jb 0x10d4a39
push edi
push dword [ebp + 0xc]
push 0x100ffa4
push 0x64
jmp 0x10d4872
cmp dword [ebp - 0x10], esi
je 0x10d49c8
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d49c1
test byte [eax + 0x1c], 1
je 0x10d49c1
cmp byte [eax + 0x19], bl
jb 0x10d49c1
push esi
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push 0x100ffa4
push 0x65
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0109b90b
mov eax, dword [0x111124c]
mov edi, 0x8007045d
jmp 0x10d4a39
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x10d4a23
call dword [sym.imp.ntdll.dll_RtlGetLastNtStatus]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10d49f1
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d4a39
test byte [eax + 0x1c], 1
je 0x10d4a39
cmp byte [eax + 0x19], bl
jb 0x10d4a39
push esi
push edi
push dword [ebp + 0xc]
push 0x100ffa4
push 0x66
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0109b90b
jmp 0x10d4a34
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 8], 0xffffffff
mov byte [ebp - 1], 0
mov eax, dword [0x111124c]
cmp dword [ebp - 8], 0xffffffff
je 0x10d4a51
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 8], 0xffffffff
mov eax, dword [0x111124c]
cmp byte [ebp - 1], 0
je 0x10d4a9a
push 0
push 0
push dword [ebp + 0xc]
call fcn.0107f35a
test eax, eax
jge 0x10d4a95
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d4a9a
test byte [eax + 0x1c], 1
je 0x10d4a9a
cmp byte [eax + 0x19], 3
jb 0x10d4a9a
push edi
push dword [ebp + 0xc]
push 0x100ffa4
push 0x67
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010196ed
mov eax, dword [0x111124c]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10d4aab
call fcn.010d1b11
mov eax, dword [0x111124c]
cmp dword [ebp - 0xc], 0
je 0x10d4ac3
push dword [ebp - 0xc]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
and dword [ebp - 0xc], 0
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x10d4ae8
test byte [eax + 0x1c], 1
je 0x10d4ae8
cmp byte [eax + 0x19], 4
jb 0x10d4ae8
push 0x100ffa4
push 0x68
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x10