Function at 0x401810
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0xdc
mov esi, dword [esp + 0xf0]
mov eax, dword [esp + 0xfc]
mov ecx, dword [esp + 0xf4]
mov edx, dword [esp + 0xf8]
mov edi, dword [esp + 0x100]
mov dword [esp], ebx
mov dword [esp + 0x40], esi
mov dword [esp + 0x4c], eax
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov esi, 0xe
mov dword [esp + 0x14], edi
mov dword [esp + 0x44], ecx
lea edi, [esp + 0x50]
mov dword [esp + 0x48], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
call dbg.jq_start
mov eax, dword [esp + 0x104]
and eax, 0x80
mov dword [esp + 0x24], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
call dbg.jq_next
mov ebp, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], eax
mov dword [esp], ebp
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
call sym._jv_get_kind
test eax, eax
je 0x401a24
test byte [0x4cf038], 8
je 0x40190e
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
cmp eax, 5
je 0x401cb2
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
cmp eax, 2
je 0x4019d0
mov eax, dword [esp + 0x50]
xor esi, esi
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
cmp eax, 1
je 0x4019d0
test byte [0x4cf039], 0x40
jne 0x4019de
mov eax, dword [esp + 0x104]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call dbg.jv_dump
mov eax, dword [0x4cf038]
test ah, 4
je 0x401a00
test ah, 8
je 0x401884
mov dword [esp], 1
call dword [0x473380]
mov dword [esp], eax
call sym._fflush
jmp 0x401884
test byte [0x4cf039], 0x40
mov esi, 0xb
je 0x40196f
mov dword [esp], 1
call dword [0x473380]
mov ecx, dword [esp + 0x24]
mov edx, eax
mov eax, 0x474858
call sym._priv_fwrite.constprop.2
jmp 0x40196f
mov dword [esp], 1
call dword [0x473380]
mov ecx, dword [esp + 0x24]
mov edx, eax
mov eax, 0x47485a
call sym._priv_fwrite.constprop.2
mov eax, dword [0x4cf038]
jmp 0x4019a8
mov dword [esp], ebx
call dbg.jq_halted
test eax, eax
je 0x401d90
lea eax, [esp + 0x80]
mov dword [esp + 4], ebx
or dword [0x4cf038], 0x2000
xor esi, esi
mov dword [esp], eax
call dbg.jq_get_exit_code
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
test eax, eax
jne 0x402060
mov eax, dword [esp + 0x80]
lea edi, [esp + 0x90]
mov dword [esp], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
call dbg.jv_free
mov dword [esp + 4], ebx
mov dword [esp], edi
call dbg.jq_get_error_message
mov eax, dword [esp + 0x90]
mov dword [esp], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
cmp eax, 5
mov eax, dword [esp + 0x90]
mov dword [esp], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0xc], eax
je 0x402030
call sym._jv_get_kind
cmp eax, 1
mov ebx, dword [dbg.__acrt_iob_func]
je 0x401c40
mov eax, dword [esp + 0x90]
mov dword [esp], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
test eax, eax
mov ebx, dword [dbg.__acrt_iob_func]
je 0x401c40
mov edx, dword [esp + 0x90]
lea eax, [esp + 0x70]
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0x94]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x98]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x10], edx
call sym._jv_copy
mov eax, dword [esp + 0x70]
mov dword [esp], edi
mov dword [esp + 0x14], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x10], eax
call dbg.jv_dump_string
mov eax, dword [esp + 0x90]
mov dword [esp], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0xc], eax
call sym._jv_string_value
mov edi, eax
mov dword [esp], 2
call ebx
mov dword [esp + 8], edi
mov dword [esp + 4], 0x47485c
mov dword [esp], eax
call sym._fprintf
nop
lea esi, [esi]
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sym._fflush
mov eax, dword [esp + 0x90]
mov dword [esp], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0xc], eax
call dbg.jv_free
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call dbg.jv_free
add esp, 0xdc
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x4cf038], 0x20
mov dword [esp], 1
jne 0x401ff0
call dword [0x473380]
mov edx, dword [esp + 0x50]
mov ebp, eax
lea eax, [esp + 0x60]
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x10], edx
call sym._jv_copy
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0xc], eax
call dbg.jv_string_length_bytes
mov esi, eax
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call sym._jv_string_value
mov dword [esp + 0xc], ebp
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fwrite
mov eax, dword [esp + 0x50]
xor esi, esi
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call dbg.jv_free
jmp 0x40199e
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x80]
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x10], edx
call sym._jv_copy
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
call dbg.jv_invalid_has_msg
test eax, eax
je 0x401c81
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x90]
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x10], edx
call sym._jv_copy
mov edx, dword [esp + 0x90]
lea eax, [esp + 0xb0]
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0x94]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x98]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x10], edx
call dbg.jv_invalid_get_msg
lea eax, [esp + 0xc0]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dbg.jq_util_input_get_position
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
cmp eax, 5
je 0x4020f3
mov edx, dword [esp + 0xb0]
lea eax, [esp + 0x30]
mov dword [esp + 0x14], 0
mov dword [esp], eax
mov dword [esp + 4], edx
mov edx, dword [esp + 0xb4]
mov dword [esp + 8], edx
mov edx, dword [esp + 0xb8]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0xbc]
mov dword [esp + 0x10], edx
call dbg.jv_dump_string
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xb4], ecx
mov dword [esp + 0xb8], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xb0], ebx
mov dword [esp], ebx
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc], eax
call sym._jv_string_value
mov esi, eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 0xc], eax
call sym._jv_string_value
mov ebx, eax
mov dword [esp], 2
call dword [0x473380]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.jq:_error__at__s___not_a_string_:__s_n
mov dword [esp], eax
call sym._fprintf
mov eax, dword [esp + 0xc0]
mov esi, 5
mov dword [esp], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 0xc], eax
call dbg.jv_free
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 0xc], eax
call dbg.jv_free
jmp 0x401c81
call dword [0x473380]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], 2
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
call dbg.jv_dumpf
jmp 0x401d5c
call sym._jv_string_value
mov edi, eax
mov dword [esp], 2
mov ebx, dword [dbg.__acrt_iob_func]
call ebx
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._fputs
jmp 0x401c40
mov eax, dword [esp + 0x80]
mov esi, 5
mov dword [esp], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
call sym._jv_get_kind
cmp eax, 4
jne 0x401a8b
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
call sym._jv_number_value
fnstcw word [esp + 0x2e]
movzx eax, word [esp + 0x2e]
mov ah, 0xc
mov word [esp + 0x2c], ax
fldcw word [esp + 0x2c]
fistp dword [esp + 0x28]
fldcw word [esp + 0x2e]
mov esi, dword [esp + 0x28]
jmp 0x401a8b
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xb8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xbc]
mov dword [esp + 0xc], eax
call sym._jv_string_value
mov esi, eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 0xc], eax
call sym._jv_string_value
mov ebx, eax
mov dword [esp], 2
call dword [0x473380]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.jq:_error__at__s_:__s_n
mov dword [esp], eax
call sym._fprintf
jmp 0x401f86