Function at 0x401090
Capabilities:
Allocate or change rwx memory
Initialize winsock library
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push ebx
push esi
push edi
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x1a4]
push eax
push 0x101
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4010dd
push str.WSAStartup_failed_exiting..
call fcn.0040166c
add esp, 4
xor eax, eax
jmp 0x40155c
mov dword [ebp - 0x10], 1
jmp 0x4010ef
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp + 8]
jge 0x4014e6
mov byte [ebp - 0x234], 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
movsx eax, byte [edx]
cmp eax, 0x2d
jne 0x40111f
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
mov byte [eax], 0x2f
push 0x409468
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x401146
call fcn.00401000
xor eax, eax
jmp 0x40155c
push 0x409464
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x40116d
call fcn.00401000
xor eax, eax
jmp 0x40155c
push str._break
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x401199
mov dword [ebp - 0x1a8], 1
mov byte [ebp - 0x234], 1
push str._fopen
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x401249
mov ecx, dword [ebp - 0x10]
add ecx, 1
cmp ecx, dword [ebp + 8]
jl 0x4011d7
push str._fhand_no_argument_found_n
call fcn.0040166c
add esp, 4
push 0
call fcn.00401597
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4 + 4]
mov dword [ebp - 0x238], ecx
push 0
lea edx, [ebp - 0x230]
push edx
mov eax, dword [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x401221
mov ecx, dword [ebp - 0x238]
push ecx
push str.Option__fopen_Could_not_open_file__s_r_n
call fcn.0040166c
add esp, 8
push 0
call fcn.00401597
mov edx, dword [ebp - 0x238]
push edx
mov eax, dword [ebp - 8]
push eax
push str.Successfully_opened_a_handle__0x_X__to__s_r_n
call fcn.0040166c
add esp, 0xc
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov byte [ebp - 0x234], 1
push 0x4093e0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4]
push ecx
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x4013bf
mov edx, dword [ebp - 0x10]
add edx, 1
cmp edx, dword [ebp + 8]
jl 0x401287
push str.Invalid_option__va_must_specify_0xBase_0xSize_as_next_arg_n
call fcn.0040166c
add esp, 4
push 0
call fcn.00401597
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4 + 4]
push edx
call fcn.004073da
add esp, 4
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x244], 0
push 0x4093a0
mov eax, dword [ebp - 0x240]
push eax
call fcn.00401960
add esp, 8
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0
je 0x4013ab
mov ecx, dword [ebp - 0x248]
mov byte [ecx], 0
mov edx, dword [ebp - 0x248]
add edx, 1
mov dword [ebp - 0x248], edx
push 0x10
push 0
mov eax, dword [ebp - 0x248]
push eax
call fcn.00401733
add esp, 0xc
mov dword [ebp - 0x23c], eax
push 0x10
push 0
mov ecx, dword [ebp - 0x240]
push ecx
call fcn.00401733
add esp, 0xc
mov dword [ebp - 0x244], eax
push 0x40
push 0x3000
mov edx, dword [ebp - 0x23c]
push edx
mov eax, dword [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x24c], eax
mov ecx, dword [ebp - 0x24c]
add ecx, dword [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x24c]
push edx
mov eax, dword [ebp - 0x23c]
push eax
mov ecx, dword [ebp - 0x244]
push ecx
push str.VirtualAlloc_base_x__size_x____x____x_n
call fcn.0040166c
add esp, 0x14
cmp dword [ebp - 0x24c], 0
jne 0x401399
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ErrorCode:__x_nAborting..._n
call fcn.0040166c
add esp, 8
push 0
call fcn.00401597
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov byte [ebp - 0x234], 1
jmp 0x4013bf
push str.Invalid_option__va_must_specify_0xBase_0xSize_as_next_arg_n
call fcn.0040166c
add esp, 4
push 0
call fcn.00401597
push str._dll
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
push edx
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x40143f
mov eax, dword [ebp - 0x10]
add eax, 1
cmp eax, dword [ebp + 8]
jl 0x4013f9
push str.Invalid_option__dll_must_specify_dll_to_load_as_next_arg_n
call fcn.0040166c
add esp, 4
push 0
call fcn.00401597
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4 + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x250], eax
mov ecx, dword [ebp - 0x250]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4 + 4]
push ecx
push str.LoadLibrary__s___0x_x_n
call fcn.0040166c
add esp, 0xc
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov byte [ebp - 0x234], 1
push str._foff
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
push edx
call fcn.00401960
add esp, 8
test eax, eax
jbe 0x4014b4
mov eax, dword [ebp - 0x10]
add eax, 1
cmp eax, dword [ebp + 8]
jl 0x401479
push str.Invalid_option__foff_must_specify_start_file_offset_as_next_arg_n
call fcn.0040166c
add esp, 4
push 0
call fcn.00401597
push 0x10
push 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4 + 4]
push eax
call fcn.00401733
add esp, 0xc
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
push str.Starting_at_file_offset_0x_x_n
call fcn.0040166c
add esp, 8
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov byte [ebp - 0x234], 1
mov eax, dword [ebp - 0x234]
and eax, 0xff
test eax, eax
jne 0x4014e1
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
push str.Unknown_Option__s_n_n
call fcn.0040166c
add esp, 8
push 0
call fcn.00401597
jmp 0x4010e6
mov dword [ebp - 4], sym.husk.exe_buf
cmp dword [ebp - 0x14], 0
jle 0x40153f
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [ecx + 4]
push edx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
xor ecx, ecx
mov cl, byte [eax + 3]
push ecx
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x14]
xor eax, eax
mov al, byte [edx + 2]
push eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x14]
xor edx, edx
mov dl, byte [ecx + 1]
push edx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x14]
xor ecx, ecx
mov cl, byte [eax]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push str.Start_opcodes:__04x_____02x__02x__02x__02x__02x_n
call fcn.0040166c
add esp, 0x1c
mov dword [ebp - 0xc], sym.husk.exe_buf
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1a8]
add eax, ebx
cmp ecx, 1
jne 0x40155a
int3
jmp eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret