Function at 0x403b80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [esp + 0x80]
mov edi, dword [esp + 0x84]
mov dword [esp], eax
call sub.msys_2.0.dll_strdup
test eax, eax
mov dword [esp + 0x18], eax
je 0x4041b4
call sub.msys_2.0.dll___locale_mb_cur_max
cmp eax, 1
jle 0x403e50
test edi, edi
jne 0x403f40
mov eax, dword [esp + 0x18]
mov dword [esp + 0x3c], eax
mov edx, eax
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x403bc9
mov ecx, eax
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], 0
shr ecx, 0x10
test eax, 0x8080
mov dword [esp + 0x34], 0
cmove eax, ecx
lea ecx, [edx + 2]
mov byte [esp + 0x38], 0
cmove edx, ecx
add al, al
mov eax, edx
mov edx, dword [esp + 0x18]
sbb eax, 3
xor ebp, ebp
mov dword [esp + 0x28], eax
mov edi, ebp
cmp edx, eax
mov ebx, edx
jb 0x403ca5
jmp 0x403d7f
movzx ecx, byte [ebx]
mov eax, ecx
shr al, 5
movzx eax, al
mov eax, dword [eax*4 + 0x40c540]
bt eax, ecx
jae 0x403df0
mov dword [esp + 0x40], 1
movsx ax, byte [ebx]
mov ebp, 1
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x44], 1
mov word [esp + 0x46], ax
test edi, edi
mov byte [esp + 0x38], 1
je 0x403d3c
cmp edi, 1
je 0x403d90
cmp edi, 2
je 0x403dc2
mov edi, 1
add ebx, ebp
mov byte [esp + 0x38], 0
cmp ebx, esi
mov dword [esp + 0x3c], ebx
jae 0x403d76
cmp byte [esp + 0x2c], 0
je 0x403c30
lea ebx, [esp + 0x30]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], ebx
sub eax, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
lea eax, [esp + 0x46]
mov dword [esp], eax
call sub.msys_2.0.dll_mbrtowc
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
je 0x403e10
cmp eax, 0xfffffffe
je 0x403e30
test eax, eax
jne 0x403d0d
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], 1
cmp byte [eax], 0
jne 0x404148
cmp word [esp + 0x46], 0
jne 0x40416c
mov dword [esp], ebx
mov byte [esp + 0x44], 1
call sub.msys_2.0.dll_mbsinit
test eax, eax
je 0x403d23
mov byte [esp + 0x2c], 0
test edi, edi
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x38], 1
jne 0x403c7b
cmp byte [esp + 0x44], 0
mov edi, 1
je 0x403c92
movzx eax, word [esp + 0x46]
mov dword [esp], eax
call sub.msys_2.0.dll_iswspace
test eax, eax
mov byte [esp + 0x38], 0
sete al
add ebx, ebp
movzx eax, al
cmp ebx, esi
mov dword [esp + 0x3c], ebx
mov edi, eax
jb 0x403ca5
cmp edi, 2
je 0x4040a4
mov eax, dword [esp + 0x18]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [esp + 0x44], 0
je 0x403c92
movzx eax, word [esp + 0x46]
mov dword [esp], eax
call sub.msys_2.0.dll_iswspace
mov edx, dword [esp + 0x1c]
test eax, eax
mov eax, 2
cmovne edi, eax
cmovne edx, ebx
mov dword [esp + 0x1c], edx
jmp 0x403c92
cmp byte [esp + 0x44], 0
je 0x403c8d
movzx eax, word [esp + 0x46]
mov dword [esp], eax
call sub.msys_2.0.dll_iswspace
test eax, eax
mov eax, 1
cmove edi, eax
jmp 0x403c92
lea ebx, [esp + 0x30]
mov dword [esp], ebx
call sub.msys_2.0.dll_mbsinit
test eax, eax
je 0x404190
mov byte [esp + 0x2c], 1
jmp 0x403cb0
mov dword [esp + 0x40], 1
mov byte [esp + 0x44], 0
mov ebp, 1
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x3c]
jmp 0x403c6e
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x44], 0
mov ebp, esi
sub ebp, ebx
mov dword [esp + 0x40], ebp
jmp 0x403c6e
test edi, edi
je 0x403eb9
mov esi, dword [esp + 0x18]
movzx eax, byte [esi]
test al, al
je 0x40413f
mov edx, dword [sym.imp.msys_2.0.dll___ctype_ptr__]
mov edx, dword [edx]
test byte [edx + eax + 1], 8
jne 0x403e87
jmp 0x40413f
test byte [edx + eax + 1], 8
je 0x403e91
add esi, 1
movzx eax, byte [esi]
test al, al
jne 0x403e80
mov dword [esp], esi
call sub.msys_2.0.dll_strlen
add eax, 1
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sub.msys_2.0.dll_memmove
cmp edi, 1
je 0x403d7f
mov edx, dword [esp + 0x18]
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x403ebd
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
add al, al
sbb edx, 3
lea eax, [edx - 1]
cmp dword [esp + 0x18], eax
ja 0x403d7f
mov edx, dword [sym.imp.msys_2.0.dll___ctype_ptr__]
mov ecx, dword [edx]
movzx edx, byte [eax]
test byte [ecx + edx + 1], 8
je 0x403d7f
mov ebx, dword [esp + 0x18]
jmp 0x403f22
movzx edx, byte [eax]
test byte [ecx + edx + 1], 8
je 0x403d7f
mov byte [eax], 0
sub eax, 1
cmp ebx, eax
jbe 0x403f14
mov eax, dword [esp + 0x18]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x18]
mov dword [esp + 0x3c], eax
mov edx, eax
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x403f4a
mov ecx, eax
mov byte [esp + 0x2c], 0
mov dword [esp + 0x30], 0
shr ecx, 0x10
test eax, 0x8080
mov dword [esp + 0x34], 0
cmove eax, ecx
lea ecx, [edx + 2]
mov byte [esp + 0x38], 0
mov ebx, dword [esp + 0x18]
cmove edx, ecx
add al, al
sbb edx, 3
cmp dword [esp + 0x18], edx
mov dword [esp + 0x28], edx
jae 0x4040f6
lea ebp, [esp + 0x46]
lea esi, [esp + 0x30]
jmp 0x404016
movzx edx, byte [ebx]
mov eax, edx
shr al, 5
movzx eax, al
mov eax, dword [eax*4 + 0x40c540]
bt eax, edx
jae 0x4040c0
mov dword [esp + 0x40], 1
movsx ax, byte [ebx]
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x44], 1
mov byte [esp + 0x38], 1
mov word [esp + 0x46], ax
movzx eax, word [esp + 0x46]
mov dword [esp], eax
call sub.msys_2.0.dll_iswspace
test eax, eax
je 0x4040f6
add ebx, dword [esp + 0x40]
mov byte [esp + 0x38], 0
cmp dword [esp + 0x28], ebx
mov dword [esp + 0x3c], ebx
jbe 0x4040f6
cmp byte [esp + 0x2c], 0
je 0x403fb0
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0xc], esi
mov dword [esp], ebp
sub eax, edx
mov dword [esp + 4], edx
mov dword [esp + 8], eax
call sub.msys_2.0.dll_mbrtowc
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
je 0x4040e0
cmp eax, 0xfffffffe
je 0x40412a
test eax, eax
jne 0x404076
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], 1
cmp byte [eax], 0
jne 0x404148
cmp word [esp + 0x46], 0
jne 0x40416c
mov dword [esp], esi
mov byte [esp + 0x44], 1
call sub.msys_2.0.dll_mbsinit
test eax, eax
je 0x40408c
mov byte [esp + 0x2c], 0
movzx eax, byte [esp + 0x44]
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x38], 1
test al, al
jne 0x403fea
jmp 0x4040f6
mov eax, dword [esp + 0x1c]
mov byte [eax], 0
mov eax, dword [esp + 0x18]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
call sub.msys_2.0.dll_mbsinit
test eax, eax
je 0x404190
mov byte [esp + 0x2c], 1
jmp 0x40401d
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x40], 1
mov byte [esp + 0x44], 0
mov byte [esp + 0x38], 1
mov dword [esp], ebx
call sub.msys_2.0.dll_strlen
add eax, 1
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sub.msys_2.0.dll_memmove
cmp edi, 1
jne 0x403bbf
mov eax, dword [esp + 0x18]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov byte [esp + 0x44], 0
sub eax, ebx
mov dword [esp + 0x40], eax
jmp 0x4040f1
mov esi, dword [esp + 0x18]
jmp 0x403e91
mov dword [esp + 0xc], 0x40be77
mov dword [esp + 8], str.mbiter_multi_next
mov dword [esp + 4], 0xa9
mov dword [esp], str..._coreutils_8.25_lib_mbiter.h
call sub.msys_2.0.dll___assert_func
mov dword [esp + 0xc], 0x40be8e
mov dword [esp + 8], str.mbiter_multi_next
mov dword [esp + 4], 0xaa
mov dword [esp], str..._coreutils_8.25_lib_mbiter.h
call sub.msys_2.0.dll___assert_func
mov dword [esp + 0xc], 0x40be40
mov dword [esp + 8], str.mbiter_multi_next
mov dword [esp + 4], 0x8e
mov dword [esp], str..._coreutils_8.25_lib_mbiter.h
call sub.msys_2.0.dll___assert_func
call fcn.004049f0
nop
nop
nop
nop
nop
nop
nop