Function at 0x4020e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2098
call fcn.004025a0
mov eax, dword [ebp + 8]
push edi
mov edi, dword [eax]
mov dword [ebp - 0xc], edi
lea eax, [edi + 0x10c]
mov dword [ebp - 0x10], eax
test edi, edi
je 0x4023d0
push ebx
push esi
nop dword [eax]
lea esi, [edi + 8]
push esi
lea eax, [ebp - 0x2098]
push str.SbieReleaseNsisText__s.txt
push eax
call fcn.00402410
add esp, 0xc
lea eax, [ebp - 0x2098]
push 0
push 0x80
push 2
push 0
push 2
push 0x120116
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 8], ebx
cmp ebx, 0xffffffff
je 0x4023d7
lea ecx, [ebp - 0x2098]
mov dword [ebp - 0x2098], 0xfeff
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402170
sub ecx, edx
lea eax, [ebp - 0x14]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x2098]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x98]
sub ecx, esi
nop
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x4021a0
lea eax, [ebp - 0x98]
push eax
call fcn.004059c8
mov eax, dword [ebp - 0x10]
add esp, 4
mov ebx, dword [eax]
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x4023b8
nop
mov ecx, dword [ebx + 8]
mov eax, ecx
and eax, 0xfff0000
cmp eax, 0xfff0000
jne 0x4023ab
mov esi, dword [edi + 0x10c]
test esi, esi
je 0x4023ab
cmp dword [esi + 8], ecx
jne 0x402200
mov eax, dword [esi + 0xc]
cmp eax, dword [ebx + 0xc]
je 0x402206
mov esi, dword [esi]
test esi, esi
jne 0x4021f3
test esi, esi
je 0x4023ab
lea eax, [ebp - 0x98]
push eax
movzx eax, word [esi + 8]
push eax
lea eax, [ebp - 0x2098]
push str.LangString_MSG__04d__LANG__s__
push eax
call fcn.00402410
push 6
push str.copy:
push dword [esi + 0x10]
call fcn.00405710
add esp, 0x1c
test eax, eax
jne 0x40226e
mov eax, dword [esi + 0x10]
add eax, 0xc
push eax
call fcn.00406548
mov ecx, eax
add esp, 4
mov eax, dword [edi + 0x10c]
mov dword [ebp + 8], eax
test eax, eax
je 0x40226e
nop
cmp dword [eax + 8], ecx
je 0x4022ca
mov eax, dword [eax]
mov dword [ebp + 8], eax
test eax, eax
jne 0x402260
mov esi, dword [esi + 0x10]
lea ecx, [ebp - 0x2098]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402280
sub ecx, edx
lea eax, [ebp - 0x2098]
sar ecx, 1
lea ecx, [eax + ecx*2]
movzx eax, word [esi]
test ax, ax
je 0x40236c
mov edx, eax
cmp dx, 0xd
je 0x402336
cmp dx, 0xa
je 0x402336
mov word [ecx], dx
add esi, 2
mov eax, 2
jmp 0x40235c
mov ebx, dword [eax + 0x10]
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4022d0
sub ebx, ecx
sar ebx, 1
lea edi, [ebx*2 + 2]
push edi
call fcn.00401410
mov esi, eax
mov eax, dword [ebp + 8]
push edi
push dword [eax + 0x10]
push esi
call fcn.004032f0
add esp, 0xc
test ebx, ebx
je 0x40232b
lea eax, [ebx - 1]
cmp word [esi + eax*2], 0x2e
lea eax, [esi + eax*2]
jne 0x40232b
nop
lea eax, [eax - 2]
sub ebx, 1
je 0x402325
movzx ecx, word [eax]
cmp ecx, 0xa
je 0x402310
cmp ecx, 0xd
je 0x402310
xor eax, eax
mov word [esi + ebx*2], ax
mov ebx, dword [ebp - 4]
mov edi, dword [ebp - 0xc]
jmp 0x402271
movzx eax, word [esi + 2]
add esi, 2
cmp eax, 0xd
je 0x402347
cmp eax, 0xa
jne 0x40234a
add esi, 2
mov dword [ecx], 0x5c0024
mov eax, 6
mov dword [ecx + 4], 0x6e
add ecx, eax
movzx eax, word [esi]
mov edx, eax
test ax, ax
jne 0x4022a6
mov dword [ecx], 0xd0022
mov dword [ecx + 4], 0xa
lea ecx, [ebp - 0x2098]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402382
sub ecx, edx
lea eax, [ebp - 0x18]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x2098]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [ebx]
mov dword [ebp - 4], ebx
test ebx, ebx
jne 0x4021d0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x402110
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2098]
push eax
push str.cant_create_output_file____S_n
push 2
call fcn.004069a0
add esp, 4
push eax
call fcn.00402440
add esp, 0xc
push 1
call fcn.004068c2
int3