Function at 0x401000
Capabilities:
Accept command line arguments
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x24], 1
jne 0x401041
push 0
push 0
push 0x13
push str.BF.EXE__
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
xor eax, eax
jmp 0x401338
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x4010d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x28], eax
push 0
push 0
push 0x20
push 0x403028
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push 0
push 0
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx]
push eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov eax, dword [ebp - 0x28]
jmp 0x401338
mov dword [ebp - 0x20], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x10], eax
push 0x7530
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x14], eax
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0x100000
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], 0
jmp 0x401134
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x20]
jae 0x401322
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0x3e
jne 0x40116e
cmp dword [ebp - 8], 0x752f
jne 0x401160
mov dword [ebp - 8], 0
jmp 0x401169
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
jmp 0x40131d
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0x3c
jne 0x401199
cmp dword [ebp - 8], 0
jne 0x40118b
mov dword [ebp - 8], 0x752f
jmp 0x401194
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 8], edx
jmp 0x40131d
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
cmp ecx, 0x2b
jne 0x4011be
mov edx, dword [ebp - 0x14]
add edx, dword [ebp - 8]
mov al, byte [edx]
add al, 1
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 8]
mov byte [ecx], al
jmp 0x40131d
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 4]
movsx eax, byte [edx]
cmp eax, 0x2d
jne 0x4011e4
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 8]
mov dl, byte [ecx]
sub dl, 1
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 8]
mov byte [eax], dl
jmp 0x40131d
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x2e
jne 0x401213
push 0
push 0
push 1
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 8]
push eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
jmp 0x40131d
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x2c
jne 0x401242
push 0
push 0
push 1
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 8]
push eax
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
jmp 0x40131d
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5b
jne 0x4012ac
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 8]
movzx ecx, byte [eax]
test ecx, ecx
je 0x401262
jmp 0x40112b
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
je 0x4012aa
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5b
jne 0x401291
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5d
jne 0x4012a8
mov eax, dword [ebp - 0xc]
sub eax, 1
mov dword [ebp - 0xc], eax
jmp 0x40126b
jmp 0x40131d
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5d
jne 0x40131d
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 8]
movzx ecx, byte [eax]
test ecx, ecx
jne 0x4012cc
jmp 0x40112b
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
je 0x401314
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5b
jne 0x4012fb
mov eax, dword [ebp - 0xc]
sub eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5d
jne 0x401312
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x4012d5
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
jmp 0x40112b
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
mov esp, ebp
pop ebp
ret