Function at 0x41f940
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1ac0
call fcn.00406cc0
mov eax, 0x100
mov word [esp + 0x30], ax
mov eax, 0x20
mov word [esp + 0xc], ax
call sym.test_usbprog.exe__sys_thread_lock_enter_all_0
cmp byte [0x438560], 0
jne 0x41f985
lea eax, [esp + 0xa58]
push eax
push 0x438564
call sym.test_usbprog.exe__sys_thread_lock_create_8
mov byte [0x438560], 1
call sym.test_usbprog.exe__sys_thread_lock_leave_all_0
push 0
push 0x438584
push 0x438588
push 0x438588
lea eax, [esp + 0xa68]
push eax
call sym.test_usbprog.exe__sys_error_abort_20
push 0x438564
call sym.test_usbprog.exe__sys_thread_lock_enter_4
cmp byte [0x437860], 0
jne 0x41fc64
push ebx
push ebp
push esi
push edi
push 0x43abe4
push 0x433988
mov byte [0x437860], 1
mov dword [0x43abe8], 0
mov dword [0x43abec], 0
call sym.test_usbprog.exe__util_mem_context_get_8
push 0x43abe0
push 1
push dword [0x43abe4]
push 0x40c
call sym.test_usbprog.exe__util_mem_grab_16
mov eax, dword [0x43abe0]
mov ebp, 0x400
mov word [eax + 8], bp
mov eax, dword [0x43abe0]
add eax, 8
push eax
push 0x434fb8
call sym.test_usbprog.exe__sys_cognivis_dir_8
mov eax, dword [0x43abe0]
mov dword [eax], 0
mov eax, dword [0x43abe0]
mov dword [eax + 4], 0
movzx eax, word [0x435010]
push eax
push str.ENGLISH
lea eax, [esp + 0x24]
push eax
call sym.test_usbprog.exe__string_vstring_12
movzx eax, word [0x435020]
xor ebx, ebx
push eax
push str.global.env
lea eax, [esp + 0x48]
mov dword [esp + 0x1c], ebx
push eax
call sym.test_usbprog.exe__string_vstring_12
cmp ebx, 8
jl 0x41fabe
push 1
call fcn.0040a39c
push eax
push 0x19
push 1
push str.ENV_path_not_stable_after
call fcn.0040a631
push ebx
push 0x435040
call fcn.00401f00
push 1
call fcn.0040a39c
push eax
push 7
push 1
push str._reads.
call fcn.0040a631
push 0x43504c
call fcn.00401f00
add esp, 0x34
call sym.test_usbprog.exe__sys_bomb_0
lea eax, [esp + 0x14]
inc ebx
push eax
push 0x433988
call sym.test_usbprog.exe__util_mem_context_get_8
mov esi, dword [0x43abe0]
xor edi, edi
mov dword [esp + 0x18], 0
test esi, esi
je 0x41fb3e
lea eax, [esp + 0x10]
push eax
push 1
push dword [esp + 0x1c]
push 0x40c
call sym.test_usbprog.exe__util_mem_grab_16
mov eax, dword [esp + 0x10]
mov word [eax + 8], bp
mov eax, dword [esp + 0x10]
add eax, 8
push eax
lea eax, [esi + 8]
push eax
call sym.test_usbprog.exe__string_copy_8
mov eax, dword [esp + 0x10]
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test edi, edi
jne 0x41fb2b
mov dword [esp + 0x18], eax
mov dword [eax + 4], edi
jmp 0x41fb34
mov dword [edi], eax
mov eax, dword [esp + 0x10]
mov dword [eax + 4], edi
mov esi, dword [esi]
mov edi, dword [esp + 0x10]
test esi, esi
jne 0x41fae2
lea eax, [esp + 0xa68]
push eax
lea eax, [esp + 0x148]
push eax
push 1
push 0x438588
lea eax, [esp + 0x50]
push eax
call sym.test_usbprog.exe__file_open_read_env_20
lea eax, [esp + 0xa68]
push eax
call sym.test_usbprog.exe__sys_error_4
test al, al
je 0x41fbc0
push 1
call fcn.0040a39c
push eax
push 0x23
push 1
push str.Unable_to_open_global.env_file_set.
call fcn.0040a631
push 0x435074
call fcn.00401f00
add esp, 0x18
cmp byte [esp + 0xa68], 0
jne 0x41fbbb
push 0
push 0x438584
push 0x438588
push 0x438588
lea eax, [esp + 0xa78]
push eax
call sym.test_usbprog.exe__sys_error_print_20
call sym.test_usbprog.exe__sys_bomb_0
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x150]
push eax
call fcn.0041f330
lea eax, [esp + 0x144]
push eax
call sym.test_usbprog.exe__file_close_4
mov edi, dword [esp + 0x18]
mov eax, edi
mov esi, dword [0x43abe0]
mov dword [esp + 0x10], eax
test esi, esi
je 0x41fc25
nop dword [eax]
test eax, eax
je 0x41fc29
add eax, 8
push eax
lea eax, [esi + 8]
push eax
call sym.test_usbprog.exe__string_equal_8
test al, al
je 0x41fc29
mov eax, dword [esp + 0x10]
mov esi, dword [esi]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
test esi, esi
jne 0x41fc00
test eax, eax
je 0x41fc47
push 0x43abe4
call sym.test_usbprog.exe__util_mem_context_del_4
mov eax, dword [esp + 0x14]
mov dword [0x43abe4], eax
mov dword [0x43abe0], edi
jmp 0x41fa70
lea eax, [esp + 0x14]
push eax
call sym.test_usbprog.exe__util_mem_context_del_4
push 0x43abe8
lea eax, [esp + 0x20]
push eax
call sym.test_usbprog.exe__sys_langp_get_8
pop edi
pop esi
pop ebp
pop ebx
push 0x438564
call sym.test_usbprog.exe__sys_thread_lock_leave_4
add esp, 0x1ac0
ret