Function at 0x40d100
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46411e
mov eax, dword fs:[0]
push eax
mov eax, 0x1038c
call fcn.00445fa0
mov eax, dword [0x479700]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x10388], eax
mov dword [ebp - 0x10370], ebx
jb 0x40d14f
mov edi, dword [esi]
jmp 0x40d151
mov edi, esi
push edx
lea ecx, [ebp - 0x100a8]
call fcn.00403a0e
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x10098], 0
jne 0x40d1af
push esi
lea ecx, [ebp - 0x10368]
call fcn.00406561
lea ecx, [ebp - 0x10090]
mov byte [ebp - 4], 1
push ecx
mov ecx, eax
call fcn.004076b1
push eax
lea ecx, [ebp - 0x100a8]
call fcn.00403a5b
push ebx
push 1
lea ecx, [ebp - 0x10090]
call fcn.00404662
lea ecx, [ebp - 0x10368]
mov byte [ebp - 4], bl
call fcn.00405712
lea ecx, [ebp - 0x100a8]
call fcn.0040576e
test al, al
jne 0x40d1e3
lea edx, [ebp - 0x100a8]
lea ecx, [ebp - 0x10394]
call fcn.0040580a
mov byte [eax + 5], 1
mov al, byte [eax + 4]
test al, al
sete al
test al, al
jne 0x40d86a
push ecx
push ecx
mov ecx, edi
call fcn.00410e3e
mov ebx, eax
or edx, 0xffffffff
lea eax, [ebp - 0x102f0]
mov ecx, ebx
push eax
call fcn.00410efa
mov edi, dword [ebp - 0x102f0]
add esp, 0xc
and dword [ebp - 0x10378], 0
xor esi, esi
mov dword [ebp - 0x10380], edi
test edi, edi
jle 0x40d243
lea eax, [ebp - 0x102f0]
mov edx, esi
push eax
mov ecx, ebx
call fcn.00410efa
mov edx, dword [ebp - 0x10378]
add edx, dword [ebp - 0x100c4]
inc esi
mov dword [ebp - 0x10378], edx
pop ecx
cmp esi, edi
jl 0x40d21b
and dword [ebp - 0x10060], 0
xor eax, eax
and dword [ebp - 0x1004c], 0
mov word [ebp - 0x1005c], ax
xor al, al
mov dword [ebp - 0x10048], 7
mov word [ebp - 0x10044], 0x100
and dword [ebp - 0x10384], 0
xor ecx, ecx
mov byte [ebp - 4], 2
mov dword [ebp - 0x10374], ecx
test edi, edi
jle 0x40d52d
test al, al
jne 0x40d52d
lea eax, [ebp - 0x102f0]
mov edx, ecx
push eax
mov ecx, ebx
call fcn.00410efa
pop ecx
lea eax, [ebp - 0x102ec]
mov byte [ebp - 0x10369], 0
push eax
lea ecx, [ebp - 0x10028]
call fcn.0040547b
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10028]
mov esi, dword [ebp - 0x10014]
cmp esi, 8
mov edi, dword [ebp - 0x10028]
mov eax, dword [ebp - 0x10018]
cmovae ecx, edi
cmp word [ecx + eax*2 - 2], 0x2f
jne 0x40d354
push 0x46e9f0
lea ecx, [ebp - 0x10078]
mov byte [ebp - 0x10369], 1
call fcn.0040547b
mov byte [ebp - 4], 4
lea eax, [ebp - 0x10078]
push dword [ebp - 0x10068]
cmp dword [ebp - 0x10064], 8
push ecx
cmovae eax, dword [ebp - 0x10078]
lea ecx, [ebp - 0x10028]
push eax
call fcn.004045ee
inc eax
lea ecx, [ebp - 0x10028]
push eax
call fcn.00403a8a
push 0
push 1
lea ecx, [ebp - 0x10078]
mov byte [ebp - 4], 3
call fcn.00404662
mov esi, dword [ebp - 0x10014]
mov edi, dword [ebp - 0x10028]
cmp byte [ebp + 8], 0
je 0x40d3b7
push ecx
push ecx
lea ecx, [ebp - 0x10028]
call fcn.0040d8a4
cmp eax, 0xffffffff
je 0x40d39f
push 0xffffffffffffffff
inc eax
lea ecx, [ebp - 0x10028]
push eax
lea eax, [ebp - 0x10090]
push eax
call fcn.00404ef5
push eax
lea ecx, [ebp - 0x10028]
call fcn.00403a5b
push 0
push 1
lea ecx, [ebp - 0x10090]
call fcn.00404662
jmp 0x40d3b7
and dword [ebp - 0x10018], 0
lea eax, [ebp - 0x10028]
cmp esi, 8
cmovae eax, edi
xor ecx, ecx
mov word [eax], cx
mov edi, 0x46e7d0
lea edx, [ebp - 0x100a8]
push edi
lea ecx, [ebp - 0x100c0]
call fcn.00407500
pop ecx
lea ecx, [ebp - 0x10028]
mov byte [ebp - 4], 5
push ecx
mov edx, eax
lea ecx, [ebp - 0x10040]
call fcn.00407774
pop ecx
push 0
push 1
lea ecx, [ebp - 0x100c0]
mov byte [ebp - 4], 7
call fcn.00404662
push edi
lea ecx, [ebp - 0x10090]
call fcn.0040547b
push 0x46e9f0
lea ecx, [ebp - 0x10078]
mov byte [ebp - 4], 8
call fcn.0040547b
mov byte [ebp - 4], 9
xor ecx, ecx
push dword [ebp - 0x10068]
cmp dword [ebp - 0x10064], 8
lea eax, [ebp - 0x10078]
push ecx
cmovae eax, dword [ebp - 0x10078]
lea ecx, [ebp - 0x10040]
push eax
call fcn.0040454b
mov esi, eax
cmp esi, 0xffffffff
je 0x40d476
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x10090]
push eax
push dword [ebp - 0x10068]
lea ecx, [ebp - 0x10040]
push esi
call fcn.00404257
mov ecx, dword [ebp - 0x10080]
add ecx, esi
jmp 0x40d421
push 0
push 1
lea ecx, [ebp - 0x10078]
call fcn.00404662
push 0
push 1
lea ecx, [ebp - 0x10090]
mov byte [ebp - 4], 7
call fcn.00404662
cmp byte [ebp - 0x10369], 0
je 0x40d55b
lea ecx, [ebp - 0x10040]
call fcn.0040576e
test al, al
jne 0x40d4e3
lea edx, [ebp - 0x10040]
lea ecx, [ebp - 0x10394]
call fcn.0040580a
mov ecx, dword [ebp - 0x10370]
or ecx, 1
mov dword [ebp - 0x10370], ecx
mov byte [eax + 5], 1
mov al, byte [eax + 4]
test al, al
jne 0x40d4e9
inc al
jmp 0x40d4eb
mov ecx, dword [ebp - 0x10370]
xor al, al
test cl, 1
je 0x40d503
and ecx, 0xfffffffe
mov dword [ebp - method.itdtk::object::ErrorCode_bool_.virtual_0], vtable.itdtk::object::ErrorCode_bool_.0
mov dword [ebp - 0x10370], ecx
lea ecx, [ebp - 0x10040]
push 0
push 1
test al, al
je 0x40d73b
call fcn.00404662
push 0
push 1
lea ecx, [ebp - 0x10028]
mov byte [ebp - 4], 2
call fcn.00404662
test ebx, ebx
je 0x40d84f
cmp dword [ebx], 1
sete al
test al, al
je 0x40d7ca
cmp dword [ebx], 1
je 0x40d777
mov dword [0x47da24], 0x80000
jmp 0x40d859
cmp dword [ebp - 0x1002c], 8
lea eax, [ebp - 0x10040]
cmovae eax, dword [ebp - 0x10040]
xor ecx, ecx
push ecx
push 0x80
push 2
push ecx
push ecx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [ebp - 0x10388]
xor edi, edi
mov dword [ebp - 0x1037c], eax
cmp byte [ebp - 0x10044], 0
jne 0x40d696
mov edx, dword [ebp - 0x10374]
lea eax, [ebp - 0x10010]
push ecx
push ecx
push eax
mov ecx, ebx
call fcn.00410f39
add esp, 0xc
mov dword [ebp - 0x1038c], eax
mov esi, 0x10000
test eax, eax
jne 0x40d5d2
mov esi, dword [ebp - 0x100c4]
sub esi, edi
push 0
lea eax, [ebp - 0x10398]
push eax
push esi
lea eax, [ebp - 0x10010]
push eax
push dword [ebp - 0x1037c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x10384]
add edi, esi
add eax, esi
mov esi, dword [ebp - 0x10388]
mov dword [ebp - 0x10384], eax
test esi, esi
je 0x40d686
cmp byte [ebp - 0x10043], 0
jne 0x40d686
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x471060]
mov eax, dword [ebp - 0x10378]
mulsd xmm1, qword [0x471030]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x471060]
lea eax, [ebp - 0x102ec]
push eax
divsd xmm1, xmm0
cvtpd2ps xmm0, xmm1
movss dword [ebp - 0x10060], xmm0
call fcn.00403400
pop ecx
push eax
lea eax, [ebp - 0x102ec]
push eax
lea ecx, [ebp - 0x1005c]
call fcn.00404825
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x10060]
push ecx
mov ecx, dword [esi]
call eax
cmp dword [ebp - 0x1038c], 0x600
je 0x40d595
test esi, esi
je 0x40d701
cmp byte [ebp - 0x10043], 0
jne 0x40d701
movd xmm1, dword [ebp - 0x10374]
lea eax, [ebp - 0x102ec]
movd xmm0, dword [ebp - 0x10380]
cvtdq2pd xmm1, xmm1
push eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
mulsd xmm1, qword [0x471030]
cvtpd2ps xmm0, xmm1
movss dword [ebp - 0x10060], xmm0
call fcn.00403400
pop ecx
push eax
lea eax, [ebp - 0x102ec]
push eax
lea ecx, [ebp - 0x1005c]
call fcn.00404825
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x10060]
push ecx
mov ecx, dword [esi]
call eax
push dword [ebp - 0x1037c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x10044], 0
je 0x40d731
cmp dword [ebp - 0x1002c], 8
lea eax, [ebp - 0x10040]
cmovae eax, dword [ebp - 0x10040]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 1
lea ecx, [ebp - 0x10040]
call fcn.00404662
push 0
push 1
lea ecx, [ebp - 0x10028]
mov byte [ebp - 4], 2
call fcn.00404662
mov ecx, dword [ebp - 0x10374]
inc ecx
mov dword [ebp - 0x10374], ecx
cmp ecx, dword [ebp - 0x10380]
jge 0x40d52d
mov al, byte [ebp - 0x10044]
jmp 0x40d28a
mov esi, dword [ebx + 4]
cmp dword [esi + 4], 0xffffffff
je 0x40d787
mov ecx, dword [esi]
call fcn.004106e4
or dword [esi + 4], 0xffffffff
mov edi, dword [esi]
test edi, edi
je 0x40d7ac
cmp dword [edi + 0x7c], 0
je 0x40d79e
mov ecx, edi
call fcn.004106e4
mov ecx, dword [edi]
call fcn.0040faf4
push edi
call fcn.004438c1
pop ecx
and dword [esi], 0
and dword [0x47da24], 0
push ecx
mov ecx, esi
call fcn.00410eba
push ebx
call fcn.00442fe0
pop ecx
jmp 0x40d859
cmp dword [ebx], 2
je 0x40d7db
mov dword [0x47da28], 0x80000
jmp 0x40d859
mov esi, dword [ebx + 4]
xor edi, edi
cmp byte [esi + 0x2c], 0
jne 0x40d7ef
mov ecx, esi
call fcn.00411604
mov edi, eax
cmp dword [esi + 0x20], 0
mov byte [esi + 0x2c], 1
je 0x40d808
cmp dword [esi + 0xc], 0
je 0x40d808
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
and dword [esi + 0x20], 0
cmp dword [esi + 0xc], 0
je 0x40d81b
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 0xc], 0
cmp dword [esi + 4], 0
je 0x40d834
cmp byte [esi + 8], 0
je 0x40d834
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 4], 0
push ecx
mov ecx, esi
mov byte [esi + 8], 0
mov dword [0x47da28], edi
call fcn.004116bc
jmp 0x40d7be
mov dword [0x47da28], 0x10000
push 0
push 1
lea ecx, [ebp - 0x1005c]
mov bl, 1
call fcn.00404662
push 0
push 1
lea ecx, [ebp - 0x100a8]
call fcn.00404662
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00445a5e
mov esp, ebp
pop ebp
ret