Function at 0x100de020
Capabilities:
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x868
mov eax, dword [0x101ef014]
xor eax, ebp
mov dword [esp + 0x860], eax
test ecx, ecx
je 0x100de373
cmp dword [ebp + 8], 0
je 0x100de37c
mov edi, ecx
mov dword [esp + 4], edx
push ecx
call sym.nss3.dll_PORT_Strdup_Util
add esp, 4
xor esi, esi
dec esi
test eax, eax
je 0x100de4e5
mov ebx, eax
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
inc byte [eax + ebx - 1]
lea edx, [esp + 0x30]
mov ecx, edi
call fcn.100de5e0
mov dword [esp + 0x14], eax
lea eax, [esp + 0x30]
movzx eax, word [eax + 6]
mov dword [esp + 8], eax
mov dword [esp + 0x1c], edi
mov ecx, edi
call fcn.100de500
test eax, eax
je 0x100de39d
mov edi, eax
cmp dword [esp + 0x14], 0
mov eax, 0x180
cmove eax, dword [esp + 8]
mov dword [esp + 0x24], 0
mov ecx, ebx
xor edx, edx
push eax
call fcn.100dcda0
add esp, 4
mov dword [esp + 8], eax
test eax, eax
je 0x100de393
push dword [esp + 4]
push 0x101cded2
call sym.nss3.dll_NSSUTIL_ArgGetParamValue
add esp, 8
mov esi, eax
test eax, eax
je 0x100de0fc
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], esi
push dword [esp + 4]
push 0x101c8061
call sym.nss3.dll_NSSUTIL_ArgGetParamValue
add esp, 8
mov esi, eax
mov dword [esp + 4], 0
mov eax, 0
test esi, esi
je 0x100de12d
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov dword [esp + 0x28], eax
lea eax, [esp + 0x60]
push edi
push 0x800
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x20], ebx
mov cl, 1
je 0x100de3ae
mov dword [esp + 0x10], edi
mov dword [esp + 4], 0
mov ebx, ecx
mov dword [esp + 0x14], ecx
cmp byte [esp + 0x60], 0xa
jne 0x100de1c8
mov edi, dword [esp + 4]
test edi, edi
je 0x100de19c
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
push dword [esp + 8]
push 1
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov dword [esp + 4], 0
test bl, 1
mov edi, dword [esp + 0x10]
je 0x100de315
push dword [esp + 8]
lea ebx, [esp + 0x64]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
add esp, 8
jmp 0x100de319
test bl, 1
je 0x100de26e
test cl, 1
je 0x100de24a
cmp dword [esp + 0x18], 0
je 0x100de213
push 5
push str.name
lea eax, [esp + 0x68]
push eax
call sym.nss3.dll_PL_strncasecmp
add esp, 0xc
test eax, eax
jne 0x100de213
push dword [esp + 0x24]
push dword [esp + 0x1c]
lea eax, [esp + 0x6d]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x100de339
test esi, esi
je 0x100de24a
push 8
push str.library
lea eax, [esp + 0x68]
push eax
call sym.nss3.dll_PL_strncasecmp
add esp, 0xc
test eax, eax
jne 0x100de24a
push dword [esp + 0x28]
push esi
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x100de339
lea eax, [esp + 0x60]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov esi, eax
mov eax, dword [esp + 4]
test eax, eax
je 0x100de298
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov edi, eax
jmp 0x100de29a
push edi
push 0x800
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x100de3aa
cmp byte [esp + 0x60], 0xa
jne 0x100de26e
xor ebx, ebx
jmp 0x100de170
xor edi, edi
mov dword [esp + 0x2c], esi
lea ebx, [edi + esi]
mov eax, ebx
inc eax
js 0x100de2e4
push eax
push dword [esp + 8]
call dword [sym.imp.mozglue.dll_realloc]
add esp, 8
test eax, eax
je 0x100de2e4
mov esi, eax
add edi, eax
push dword [esp + 0x2c]
lea eax, [esp + 0x64]
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [esi + ebx], 0
lea ebx, [esp + 0x60]
mov dword [esp + 4], esi
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
jmp 0x100de319
push 0
push 0xffffe013
call sym.nss3.dll_PR_SetError
add esp, 8
mov eax, dword [esp + 4]
test eax, eax
je 0x100de305
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov dword [esp + 4], 0
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
lea ebx, [esp + 0x60]
push edi
push 0x800
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
mov bl, 1
test eax, eax
mov ecx, dword [esp + 0x14]
jne 0x100de169
jmp 0x100de3ae
mov eax, dword [esp + 4]
test eax, eax
je 0x100de34b
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push edi
push 0x800
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
xor ecx, ecx
mov dword [esp + 4], 0
test eax, eax
jne 0x100de15b
jmp 0x100de3ae
push 0
push 0xffffe005
jmp 0x100de383
push 0
push 0xffffe042
call sym.nss3.dll_PR_SetError
add esp, 8
xor esi, esi
dec esi
jmp 0x100de4e5
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov ecx, ebx
call fcn.100de660
push ebx
jmp 0x100de4dc
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push edi
mov ebx, ecx
call esi
add esp, 4
push dword [esp + 8]
call esi
add esp, 4
test bl, 1
je 0x100de3da
mov ebx, dword [esp + 0x20]
mov ecx, ebx
call fcn.100de660
jmp 0x100de4a3
mov ecx, dword [esp + 0x1c]
call fcn.100de660
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
mov ebx, dword [esp + 0x2c]
push ebx
push eax
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
test eax, eax
je 0x100de4a3
mov edi, eax
add eax, eax
push eax
call sym.nss3.dll_PORT_Alloc_Util
add esp, 4
test eax, eax
je 0x100de4a3
mov esi, eax
push edi
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
test eax, eax
je 0x100de499
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push dword [esp + 0x28]
push eax
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
test eax, eax
je 0x100de499
mov edi, eax
add eax, eax
push eax
call sym.nss3.dll_PORT_Alloc_Util
add esp, 4
test eax, eax
je 0x100de499
push edi
mov edi, eax
push eax
push 0xffffffffffffffff
push dword [esp + 0x28]
push 0
push 0xfde9
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
test eax, eax
je 0x100de48f
push edi
push esi
call dword [sym.imp.kernel32.dll_MoveFileW]
mov eax, dword [sym.imp.mozglue.dll_free]
push esi
mov esi, eax
call eax
add esp, 4
push edi
call esi
jmp 0x100de4a0
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov eax, dword [esp + 0xc]
test eax, eax
je 0x100de4bf
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
mov edi, dword [esp + 4]
je 0x100de4d5
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
xor esi, esi
test edi, edi
je 0x100de4e5
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ecx, dword [esp + 0x860]
xor ecx, ebp
call fcn.10156ff0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret