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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov edi, dword [esp + 0x78]
mov esi, dword [esp + 0x70]
mov ebx, dword [esp + 0x74]
mov ebp, dword [esp + 0x80]
cmp edi, 0x24
ja 0x40586a
lea eax, [esp + 0x4c]
test ebx, ebx
cmove ebx, eax
call sub.msys_2.0.dll___errno
mov dword [eax], 0
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.msys_2.0.dll_strtoimax
mov edi, dword [ebx]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
cmp edi, esi
je 0x404e10
call sub.msys_2.0.dll___errno
mov edi, dword [eax]
xor esi, esi
test edi, edi
jne 0x404df0
test ebp, ebp
je 0x404dd5
mov edi, dword [ebx]
movzx edx, byte [edi]
test dl, dl
je 0x404dd5
movsx eax, dl
mov dword [esp], ebp
mov byte [esp + 0x28], dl
mov dword [esp + 4], eax
call sub.msys_2.0.dll_strchr
test eax, eax
movzx edx, byte [esp + 0x28]
je case.0x404db4.1
mov dword [esp + 4], 0x30
mov dword [esp], ebp
mov byte [esp + 0x28], dl
call sub.msys_2.0.dll_strchr
test eax, eax
movzx edx, byte [esp + 0x28]
je 0x404d98
movzx eax, byte [edi + 1]
cmp al, 0x44
je 0x404e70
cmp al, 0x69
je 0x404e50
cmp al, 0x42
je 0x404e70
mov dword [esp + 0x28], 1
mov eax, 0x400
sub edx, 0x42
cmp dl, 0x35
ja case.0x404db4.1
movzx edx, dl
jmp dword [edx*4 + 0x40c2a4]
xor ebp, ebp
add edi, dword [esp + 0x28]
or esi, ebp
mov eax, esi
or eax, 2
mov dword [ebx], edi
cmp byte [edi], 0
cmovne esi, eax
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [ecx], eax
mov eax, esi
mov dword [ecx + 4], edx
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msys_2.0.dll___errno
cmp dword [eax], 0x22
je 0x404e82
add esp, 0x5c
mov eax, 4
pop ebx
pop esi
pop edi
pop ebp
ret
test ebp, ebp
je 0x404dfe
movzx edx, byte [edi]
test dl, dl
je 0x404dfe
movsx eax, dl
mov dword [esp], ebp
mov byte [esp + 0x28], dl
mov dword [esp + 4], eax
xor esi, esi
call sub.msys_2.0.dll_strchr
test eax, eax
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0
movzx edx, byte [esp + 0x28]
jne 0x404d5f
jmp 0x404dfe
xor eax, eax
cmp byte [edi + 2], 0x42
sete al
lea eax, [eax + eax + 1]
mov dword [esp + 0x28], eax
mov eax, 0x400
jmp 0x404da5
mov dword [esp + 0x28], 2
mov eax, 0x3e8
jmp 0x404da5
mov si, 1
jmp 0x404d2a
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [ecx], eax
mov eax, esi
mov dword [ecx + 4], edx
or eax, 2
jmp 0x404de8
cmp dword [esp + 0x1c], 0xffc00000
jl 0x405653
cmp dword [esp + 0x1c], 0x3fffff
jg 0x405750
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
xor ebp, ebp
shld edx, eax, 9
shl eax, 9
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x404dc2
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
xor ebp, ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
call sub.msys_gcc_s_1.dll___divdi3
mov ecx, 7
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
mov esi, ebp
mov dword [esp + 0x74], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edx
mov edi, dword [esp + 0x30]
mov ebx, ecx
mov ebp, dword [esp + 0x34]
jmp 0x404fae
jg 0x404f4c
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x18], eax
jb 0x404fb8
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
mov dword [esp], 0xffffffff
jmp 0x424640
or esi, eax
sub ebx, 1
je 0x405640
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x1c], eax
jge 0x404f40
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov eax, 1
jmp 0x404fa3
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
xor ebp, ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
call sub.msys_gcc_s_1.dll___divdi3
mov ecx, 8
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x74], ebx
mov dword [esp + 0x2c], eax
mov ebx, ebp
mov dword [esp + 0x20], edx
mov esi, ecx
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x34]
jmp 0x40508e
jg 0x40502c
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x18], eax
jb 0x405098
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jl 0x405690
jg 0x40505e
cmp eax, dword [esp + 0x18]
jb 0x405690
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
imul edx, edi
imul eax, ebp
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul edi
mov dword [esp + 0x1c], edx
add dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
xor eax, eax
or ebx, eax
sub esi, 1
je 0x405770
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x1c], eax
jge 0x405020
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov eax, 1
jmp 0x405083
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
xor ebp, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
call sub.msys_gcc_s_1.dll___divdi3
mov ecx, 4
mov dword [esp + 0x30], esi
mov dword [esp + 0x38], edi
mov esi, ebp
mov dword [esp + 0x2c], eax
mov ebp, ebx
mov edi, edx
mov ebx, ecx
cmp edi, dword [esp + 0x1c]
jg 0x405670
jl 0x40510a
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x2c], ecx
ja 0x405670
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jl 0x405730
jg 0x405144
cmp eax, dword [esp + 0x18]
jb 0x405730
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
imul edx, dword [esp + 0x20]
imul eax, dword [esp + 0x18]
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul dword [esp + 0x20]
mov dword [esp + 0x1c], edx
add dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
xor eax, eax
or esi, eax
sub ebx, 1
jne 0x4050f0
mov ebx, ebp
mov edi, dword [esp + 0x38]
mov ebp, esi
mov esi, dword [esp + 0x30]
jmp 0x404dc2
cmp dword [esp + 0x1c], 0xc0000000
jl 0x405653
cmp dword [esp + 0x1c], 0x3fffffff
jg 0x405750
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
xor ebp, ebp
shld edx, eax, 1
add eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x404dc2
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
xor ebp, ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
call sub.msys_gcc_s_1.dll___divdi3
mov ecx, 5
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
mov esi, ebp
mov dword [esp + 0x74], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edx
mov edi, dword [esp + 0x30]
mov ebx, ecx
mov ebp, dword [esp + 0x34]
jmp 0x40528e
jl 0x40522c
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x2c], ecx
ja 0x405298
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jl 0x405710
jg 0x40525e
cmp eax, dword [esp + 0x18]
jb 0x405710
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
imul edx, edi
imul eax, ebp
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul edi
mov dword [esp + 0x1c], edx
add dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
xor eax, eax
or esi, eax
sub ebx, 1
je 0x405640
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x20], ecx
jle 0x405220
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov eax, 1
jmp 0x405283
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp dword [esp + 0x1c], edx
mov ecx, eax
mov ebp, edx
jl 0x4057a0
jg 0x4052ef
cmp dword [esp + 0x18], eax
jb 0x4057a0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
mov dword [esp + 0x2c], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
jl 0x4057c1
jg 0x405331
cmp eax, dword [esp + 0x18]
jb 0x4057c1
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
imul edx, dword [esp + 0x20]
imul eax, dword [esp + 0x18]
add eax, edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
mul dword [esp + 0x20]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x2c]
add dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], ebp
jl 0x405377
jg 0x4057e2
cmp dword [esp + 0x18], ecx
jae 0x4057e2
xor ebp, ebp
mov eax, 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
or ebp, eax
jmp 0x404dc2
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp dword [esp + 0x1c], edx
jl 0x405653
jg 0x4053d0
cmp dword [esp + 0x18], eax
jb 0x405653
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jl 0x405750
jg 0x40540a
cmp eax, dword [esp + 0x18]
jb 0x405750
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
xor ebp, ebp
imul eax, dword [esp + 0x18]
imul edx, dword [esp + 0x20]
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul dword [esp + 0x20]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
add dword [esp + 0x1c], ecx
jmp 0x404dc2
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
xor ebp, ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], edx
call sub.msys_gcc_s_1.dll___divdi3
mov ecx, 6
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
mov esi, ebp
mov dword [esp + 0x74], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edx
mov edi, dword [esp + 0x30]
mov ebx, ecx
mov ebp, dword [esp + 0x34]
jmp 0x4054fe
jl 0x40549c
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x2c], ecx
ja 0x405508
mov dword [esp + 8], edi
mov dword [esp + 0xc], ebp
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jl 0x4056d0
jg 0x4054ce
cmp eax, dword [esp + 0x18]
jb 0x4056d0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
imul edx, edi
imul eax, ebp
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul edi
mov dword [esp + 0x1c], edx
add dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
xor eax, eax
or esi, eax
sub ebx, 1
je 0x405640
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x20], ecx
jle 0x405490
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov eax, 1
jmp 0x4054f3
cmp dword [esp + 0x1c], 0xffe00000
jl 0x405653
cmp dword [esp + 0x1c], 0x1fffff
jg 0x405750
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
xor ebp, ebp
shld edx, eax, 0xa
shl eax, 0xa
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x404dc2
cdq
mov dword [esp + 8], eax
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x80000000
xor ebp, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
call sub.msys_gcc_s_1.dll___divdi3
mov ecx, 3
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], eax
mov esi, ebp
mov dword [esp + 0x2c], edx
mov ebp, ebx
mov ebx, ecx
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x2c], ecx
jg 0x4056f0
jl 0x4055bc
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x30], ecx
ja 0x4056f0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jl 0x405783
jg 0x4055f6
cmp eax, dword [esp + 0x18]
jb 0x405783
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
imul edx, dword [esp + 0x20]
imul eax, dword [esp + 0x18]
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul dword [esp + 0x20]
mov dword [esp + 0x1c], edx
add dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
xor eax, eax
or esi, eax
sub ebx, 1
jne 0x40559e
mov ebx, ebp
mov ebp, esi
mov esi, dword [esp + 0x38]
jmp 0x404dc2
mov ebp, esi
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x74]
jmp 0x404dc2
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov ebp, 1
jmp 0x404dc2
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov eax, 1
jmp 0x40516f
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
mov eax, 1
jmp 0x405083
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
mov eax, 1
jmp 0x4054f3
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
mov eax, 1
jmp 0x405621
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
mov eax, 1
jmp 0x405283
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
mov eax, 1
jmp 0x40516f
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
mov ebp, 1
jmp 0x404dc2
mov ebp, ebx
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x74]
jmp 0x404dc2
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
mov eax, 1
jmp 0x405621
mov ebp, 1
mov eax, 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x80000000
or ebp, eax
jmp 0x404dc2
mov ebp, 1
mov eax, 1
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
or ebp, eax
jmp 0x404dc2
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
xor ebp, ebp
mov dword [esp], 0xffffffff
mov dword [esp + 4], 0x7fffffff
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
call sub.msys_gcc_s_1.dll___divdi3
cmp edx, dword [esp + 0x1c]
jge 0x405830
mov eax, 1
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x7fffffff
or ebp, eax
jmp 0x404dc2
jg 0x405838
cmp eax, dword [esp + 0x18]
jb 0x40580e
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
imul edx, dword [esp + 0x20]
imul eax, dword [esp + 0x18]
lea ecx, [eax + edx]
mov eax, dword [esp + 0x18]
mul dword [esp + 0x20]
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x1c], edx
or ebp, eax
add dword [esp + 0x1c], ecx
jmp 0x404dc2
mov dword [esp + 0xc], str.0___strtol_base__strtol_base___36
mov dword [esp + 8], str.xstrtoimax
mov dword [esp + 4], 0x60
mov dword [esp], str..._coreutils_8.25_lib_xstrtol.c
call sub.msys_2.0.dll___assert_func
nop
nop