Function at 0x401000
Capabilities:
Create directory
Delete file
Query environment variable
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x224]
push eax
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
lea eax, [ebp - 0x224]
push eax
call ebx
mov edi, eax
or eax, 0xffffffff
cmp edi, eax
mov dword [ebp - 0x10], edi
je 0x401105
push esi
push esi
push 0x17eb8
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
je 0x401102
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x401102
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x401102
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x403a00
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x401102
mov ax, word [0x403a00]
cmp ax, si
jle 0x40110d
cmp ax, 0x1ff
ja 0x40110a
push esi
lea ecx, [ebp - 4]
push ecx
movsx eax, ax
push eax
push 0x403800
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x401102
movsx eax, word [0x403a00]
push 0x200
push 0x404220
push eax
push 0x403800
push esi
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x401111
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp ax, si
je 0x401117
jmp 0x401102
mov ax, word [0x403a00]
cmp dword [ebp - 8], esi
movsx eax, ax
mov word [eax*2 + 0x404220], si
jle 0x401102
cmp dword [ebp - 8], 0x6400000
jg 0x401102
push 0x104
lea eax, [ebp - 0x42c]
push eax
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x401102
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push str._blin_
lea eax, [ebp - 0x42c]
push eax
call edi
push esi
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.blinen.dll
lea eax, [ebp - 0x224]
push eax
call edi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
lea eax, [ebp - 0x224]
push eax
call ebx
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x224]
push eax
je 0x40120f
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.blin.exe
lea eax, [ebp - 0x224]
push eax
call edi
push esi
mov edi, 0x80
push edi
push 3
push esi
push 1
push 0x80000000
lea eax, [ebp - 0x224]
push eax
call ebx
cmp eax, 0xffffffff
je 0x401204
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
push dword [ebp - 0xc]
call esi
jmp 0x4012dd
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401228
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str.blin.exe
lea eax, [ebp - 0x224]
push eax
call edi
mov edi, 0x80
push esi
push edi
push 1
push esi
push 1
push 0x40000000
lea eax, [ebp - 0x224]
push eax
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x401266
push esi
push edi
push 5
push esi
push 1
push 0x40000000
lea eax, [ebp - 0x224]
push eax
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x401102
push esi
push esi
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 8], esi
jle 0x4012d4
mov ebx, 0x800
mov edi, 0x403a20
cmp dword [ebp - 8], ebx
jae 0x401290
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
jmp 0x401293
mov dword [ebp - 4], ebx
push esi
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4012f7
cmp dword [ebp - 4], esi
jle 0x4012f7
push esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 4]
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4012f7
mov eax, dword [ebp - 4]
cmp dword [ebp - 0x18], eax
jne 0x4012f7
sub dword [ebp - 8], eax
cmp dword [ebp - 8], esi
jg 0x401283
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x224]
push 0x404220
push eax
call fcn.00401341
pop ecx
pop ecx
xor eax, eax
jmp 0x401105
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x401102