Function at 0x100ddc80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x58
mov eax, dword [0x101ef014]
xor eax, ebp
mov dword [esp + 0x50], eax
test ecx, ecx
je 0x100ddead
mov eax, dword [ebp + 8]
test eax, eax
je 0x100ddeb6
mov esi, edx
mov edi, ecx
push eax
call fcn.100de020
add esp, 4
lea ebx, [esp + 0x20]
mov ecx, edi
mov edx, ebx
call fcn.100de5e0
test eax, eax
movzx eax, word [ebx + 6]
mov ebx, 0x180
cmove ebx, eax
xor edx, edx
inc edx
mov ecx, edi
push ebx
call fcn.100dcda0
add esp, 4
test eax, eax
je 0x100ddec5
mov dword [esp + 0x10], eax
push esi
call sym.nss3.dll_NSSUTIL_ArgStrip
add esp, 4
cmp byte [eax], 0
je 0x100de004
xor esi, esi
mov dword [esp], 0
push 0x3d
push eax
mov edi, eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov ebx, eax
push 8
push str.library
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
mov eax, 1
cmove esi, eax
test ebx, ebx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
je 0x100ddf2d
mov dword [esp + 0xc], ebx
sub ebx, edi
inc ebx
mov eax, dword [esp]
test eax, eax
je 0x100ddd5c
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov edi, eax
jmp 0x100ddd5e
xor edi, edi
lea esi, [edi + ebx]
mov eax, esi
inc eax
js 0x100ddedd
push eax
push dword [esp + 4]
call dword [sym.imp.mozglue.dll_realloc]
add esp, 8
test eax, eax
je 0x100ddedd
add edi, eax
push ebx
push dword [esp + 8]
push edi
mov edi, eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [edi + esi], 0
mov ebx, dword [esp + 0xc]
inc ebx
lea eax, [esp + 0x1c]
push eax
push ebx
call sym.nss3.dll_NSSUTIL_ArgFetchValue
add esp, 8
test eax, eax
je 0x100dde38
mov dword [esp + 0xc], ebx
mov dword [esp], eax
push eax
call sym.nss3.dll_NSSUTIL_ArgStrip
add esp, 4
mov dword [esp + 0x18], eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ebx, eax
mov dword [esp + 4], edi
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov edi, eax
add eax, ebx
mov ecx, eax
mov dword [esp + 0x14], eax
inc eax
js 0x100ddef5
mov esi, ebx
push eax
push dword [esp + 8]
call dword [sym.imp.mozglue.dll_realloc]
add esp, 8
test eax, eax
je 0x100ddef5
mov ebx, eax
add edi, eax
push esi
push dword [esp + 0x1c]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x14]
mov byte [ebx + eax], 0
push dword [esp]
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov eax, ebx
mov esi, dword [esp + 8]
mov ebx, dword [esp + 0xc]
jmp 0x100dde3e
mov esi, dword [esp + 8]
mov eax, edi
mov dword [esp + 4], eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov edi, eax
add eax, 2
js 0x100dde6f
push eax
push dword [esp + 8]
call dword [sym.imp.mozglue.dll_realloc]
add esp, 8
test eax, eax
je 0x100dde6f
mov word [eax + edi], 0xa
mov dword [esp], eax
jmp 0x100dde92
push 0
push 0xffffe013
call sym.nss3.dll_PR_SetError
add esp, 8
push dword [esp + 4]
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov dword [esp], 0
add ebx, dword [esp + 0x1c]
push ebx
call sym.nss3.dll_NSSUTIL_ArgStrip
add esp, 4
cmp byte [eax], 0
jne 0x100ddd07
jmp 0x100ddfaf
push 0
push 0xffffe005
jmp 0x100ddebd
push 0
push 0xffffe042
call sym.nss3.dll_PR_SetError
add esp, 8
xor esi, esi
dec esi
mov ecx, dword [esp + 0x50]
xor ecx, ebp
call fcn.10156ff0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0
push 0xffffe013
call sym.nss3.dll_PR_SetError
add esp, 8
mov esi, dword [esp]
test esi, esi
jne 0x100ddf14
jmp 0x100ddf1e
push 0
push 0xffffe013
call sym.nss3.dll_PR_SetError
add esp, 8
push dword [esp + 4]
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [esp]
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
jmp 0x100ddec5
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov edi, eax
mov eax, dword [esp]
test eax, eax
je 0x100ddf4c
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov esi, eax
jmp 0x100ddf4e
xor esi, esi
mov dword [esp + 0xc], edi
add edi, esi
mov eax, edi
inc eax
js 0x100ddf86
push eax
push dword [esp + 4]
call dword [sym.imp.mozglue.dll_realloc]
add esp, 8
test eax, eax
je 0x100ddf86
mov ebx, eax
add esi, eax
push dword [esp + 0xc]
push dword [esp + 8]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [ebx + edi], 0
jmp 0x100ddfa8
push 0
push 0xffffe013
call sym.nss3.dll_PR_SetError
add esp, 8
xor ebx, ebx
mov eax, dword [esp]
test eax, eax
je 0x100ddfa8
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [esp + 8]
mov dword [esp], ebx
mov edi, dword [esp]
test edi, edi
je 0x100de004
test esi, esi
jne 0x100ddfd4
push dword [esp + 0x10]
push 1
push 9
push str.library_n
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov edi, dword [esp + 0x10]
add esp, 0x10
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov esi, dword [esp + 0x10]
push esi
push 1
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
push esi
push 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
add esp, 8
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
xor esi, esi
jmp 0x100ddec8