Function at 0x40b249
Capabilities:
Write file on windows

Disassembly:
push 0x7c
mov eax, 0x4256d7
call fcn.00416b41
mov edi, ecx
mov dword [ebp - 0x5c], edi
xor eax, eax
mov bl, al
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
call fcn.004034b6
mov dword [ebp - 0x64], eax
xor eax, eax
lea ecx, [ebp - 0x78]
inc eax
mov byte [ebp - 4], al
lea eax, [ebp - 0x64]
push eax
call fcn.00401368
lea ecx, [ebp - 0x64]
call fcn.00402cc8
xor eax, eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 2
mov esi, dword [edi + 0x44]
mov edi, dword [edi + 0x48]
jmp 0x40b2ed
push esi
call fcn.004059ac
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x88]
call fcn.004010e9
push eax
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 4
call fcn.00402c23
lea ecx, [ebp - 0x88]
call fcn.004011af
push 0
push 1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00405a11
add esi, 0x18
lea ecx, [ebp - 0x28]
cmp esi, edi
jne 0x40b2a9
push str.allowed_origins
call fcn.00405646
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x78]
call fcn.004012eb
mov ecx, eax
call fcn.00402c6f
mov ecx, eax
call fcn.00401326
xor edi, edi
mov byte [ebp - 4], 2
push edi
push 1
lea ecx, [ebp - 0x28]
call fcn.00405a11
push str.path
lea ecx, [ebp - 0x28]
call fcn.00405646
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x58]
mov esi, dword [ebp - 0x5c]
lea edx, [esi + 0x50]
call fcn.004068bf
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 7
call fcn.00401130
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x78]
call fcn.004012eb
mov ecx, eax
call fcn.00402c6f
mov ecx, eax
call fcn.004012b9
lea ecx, [ebp - 0x88]
call fcn.004011af
push edi
push 1
lea ecx, [ebp - 0x58]
call fcn.00405a11
push edi
push 1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00405a11
push str.description
lea ecx, [ebp - 0x28]
call fcn.00405646
push str.Info_Software_lp_Native_Host
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 9
call fcn.00401168
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x78]
call fcn.004012eb
mov ecx, eax
call fcn.00402c6f
mov ecx, eax
call fcn.004012b9
lea ecx, [ebp - 0x88]
call fcn.004011af
push edi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x28]
push 1
call fcn.00405a11
push str.name
lea ecx, [ebp - 0x28]
call fcn.00405646
push str.org.infosoftware.ext_host
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 0xb
call fcn.00401168
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x78]
call fcn.004012eb
mov ecx, eax
call fcn.00402c6f
mov ecx, eax
call fcn.004012b9
lea ecx, [ebp - 0x88]
call fcn.004011af
push edi
push 1
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00405a11
push str.type
lea ecx, [ebp - 0x28]
call fcn.00405646
push str.stdio
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 0xd
call fcn.00401168
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x78]
call fcn.004012eb
mov ecx, eax
call fcn.00402c6f
mov ecx, eax
call fcn.004012b9
lea ecx, [ebp - 0x88]
call fcn.004011af
push edi
inc edi
mov byte [ebp - 4], 2
push edi
lea ecx, [ebp - 0x28]
call fcn.00405a11
push ecx
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x78]
call fcn.004015c6
lea eax, [esi + 0x80]
cmp dword [eax + 0x14], 8
jb 0x40b4cd
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push edi
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40b523
and dword [ebp - 0x5c], 0
lea eax, [ebp - 0x5c]
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0x40]
push 0
cmovae ecx, dword [ebp - 0x40]
push eax
push dword [ebp - 0x30]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b51c
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x30]
movzx ebx, bl
cmove ebx, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push edi
lea ecx, [ebp - 0x40]
call fcn.00405a11
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 0
call fcn.00402ec1
lea ecx, [ebp - 0x78]
call fcn.004011af
mov al, bl
call fcn.00416af0
ret