Function at 0x401229
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msys_1.0.dll_strlen
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msys_opts_25.dll_option_strtransform
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [0x409120]
mov dword [esp], eax
call sub.msys_1.0.dll_strstr
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4012b9
mov edx, dword [ebp - 8]
lea eax, [ebp - 4]
add dword [eax], edx
mov eax, dword [ebp - 4]
movsx eax, byte [eax]
add eax, dword [sym.imp.msys_1.0.dll__ctype_]
inc eax
movsx eax, byte [eax]
and eax, 8
test eax, eax
je 0x401292
lea eax, [ebp - 4]
inc dword [eax]
jmp 0x401274
mov eax, dword [ebp + 8]
mov ecx, eax
mov eax, dword [ebp - 4]
movzx edx, byte [eax]
lea eax, [ebp - 4]
inc dword [eax]
mov byte [ecx], dl
inc dword [ebp + 8]
cmp dl, 0x5d
je 0x4012ae
jmp 0x401292
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
jmp 0x40149e
mov edx, dword [0x409120]
mov eax, dword [0x409124]
sub eax, edx
add eax, dword [ebp - 8]
add eax, 0x40
cmp eax, dword [0x40912c]
jbe 0x40136c
add dword [0x40912c], 0x1fff
and dword [0x40912c], 0xfffff000
mov eax, dword [0x40912c]
mov dword [esp + 4], eax
mov eax, dword [0x409120]
mov dword [esp], eax
call sub.msys_1.0.dll_realloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40132f
mov eax, dword [0x409164]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Realloc_of_index_text_failed_n
call sub.msys_1.0.dll_fputs
mov dword [esp], 1
call sub.msys_1.0.dll_exit
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x409120]
je 0x40136c
mov edx, dword [0x409120]
mov eax, dword [0x409128]
sub eax, edx
add eax, dword [ebp - 0x10]
mov dword [0x409128], eax
mov edx, dword [0x409120]
mov eax, dword [0x409124]
sub eax, edx
add eax, dword [ebp - 0x10]
mov dword [0x409124], eax
mov eax, dword [ebp - 0x10]
mov dword [0x409120], eax
mov eax, dword [0x409124]
cmp eax, dword [0x409120]
jne 0x40138c
mov eax, dword [0x406684]
sub eax, 0xffffff80
mov eax, dword [eax + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x401452
mov dword [esp + 4], 0x20
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msys_1.0.dll_strrchr
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov byte [eax], 0
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msys_1.0.dll_strlen
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [0x409120]
mov dword [esp], eax
call sub.msys_1.0.dll_strstr
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4013e9
mov eax, dword [0x406684]
sub eax, 0xffffff80
mov eax, dword [eax + 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov byte [eax], 0x20
jmp 0x401452
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
add edx, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msys_1.0.dll_strstr
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40140b
jmp 0x401413
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
jmp 0x4013e9
mov eax, dword [ebp - 0x10]
mov byte [eax], 0x20
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [esp + 4], 0x5b
mov dword [esp], eax
call sub.msys_1.0.dll_strchr
mov dword [ebp - 4], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 4]
inc eax
mov dword [esp], eax
call sub.msys_1.0.dll_strtol
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.__40s____d__n
mov eax, dword [0x409124]
mov dword [esp], eax
call sub.msys_1.0.dll_sprintf
add dword [0x409124], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.__d_
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msys_1.0.dll_sprintf
add dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
leave
ret